Hi
I have a little piece of a batch file which works out the number of last month...however I am struggling to get the set command to work properly to remove 1 from the number.
Anyone able to make it work ?
Thanks..
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do (
set MO=%%B
set Y=%%C
)
echo Month is %MO%
set /A M= ( %MO% -1)
echo Month is %M%
pause
I have a little piece of a batch file which works out the number of last month...however I am struggling to get the set command to work properly to remove 1 from the number.
Anyone able to make it work ?
Thanks..
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do (
set MO=%%B
set Y=%%C
)
echo Month is %MO%
set /A M= ( %MO% -1)
echo Month is %M%
pause