I have the following...
@ECHO OFF
setlocal EnableDelayedExpansion
for /f "skip=1" %%p in ('wmic cpu get loadpercentage') do @echo %%p
ECHO ...this worked
ECHO.
PAUSE
for /f "skip=1" %%p in ('wmic cpu get loadpercentage') do set cpu=%%p
ECHO cpu is %cpu%
ECHO ...this did not work
ECHO.
PAUSE
How come I can't set the number in the variable %cpu% it's always blank!