I'm trying to do a number comparison in a ms-dos batch file. I have the following code
set /a lastmonth_=%monthnr_%-1
echo %lastmonth_%
if %lastmonth_% < 10 set %lastmonth_% = 0%lastmonth_%
echo %lastmonth_%
the "< 10" isn't working - says something about < is unexpected.
How do you do number comparisons in MS DOS batch files?
Thanks.


Reply With Quote