I want to create a basic program
Go to solution
Solved by mariushm,
The program is nvidia-smi.exe and what comes after are called parameters or arguments
so you enter something like this in your .bat file:
C: CD "C:\Program Files\NVIDIA Corporation\NVSMI" nvidia-smi.exe -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=power.draw > output.txt
first line moves the "action" to the c: partition if the .bat file is started from another partition
2nd line sets the working folder to that one
3rd line starts a program called nvidia-smi.exe with the parameters that follow and the output is redirected from screen to file called output.txt
if the full path is omitted, the file is created in the current folder, set with the cd command , so output.txt will be created in the same folder where nvidia-smi.exe is located
You can work around having to set the folder by always entering the full paths:
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -i 0 --loop-ms=1000 --format=csv,noheader --query-gpu=power.draw > "c:\temp\output.txt"
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now