So I need use the GPU temperature as a variable in batch but I haven't quite understood how to pick only it, nothing else. I need the the latest temperature every 10 seconds. How to pick always the latest temperature from the text file and set it as %temperature%
所以我需要在批处理中使用GPU温度作为变量,但我还不太明白如何只选择它,没有别的。我需要每10秒钟一次的最新温度。如何从文本文件中始终选择最新温度并将其设置为%temperature%
1 个解决方案
#1
1
@echo off
:loop
for /f "tokens=3 delims=, " %%a in (input.txt) do set "temperature=%%a"
echo %temperature%
timeout /t 10 >nul
goto :loop
#1
1
@echo off
:loop
for /f "tokens=3 delims=, " %%a in (input.txt) do set "temperature=%%a"
echo %temperature%
timeout /t 10 >nul
goto :loop