i have the next code:
Code: Select all
FOR /f "tokens=1 usebackq delims=," %%a in (`dsquery computer "OU=Users PC,OU=Computers,OU=Office,DC=gpi,DC=domain,DC=com"`) do (
rem set /a zzz=%zzz%+1
set zzz=%%a
echo %zzz%
echo %%a
)
pause
when it's running, i get the right value of %%a for all steps in cycle,
but %zzz% is always empty...
what's wrong?
have i to set zzz as global variable? how?
or the syntax for set zzz=%%a is incorrect?