|
Answer» HI ,
May I know how to code the followings logic in DOS bat programs ?
if %mm%=01 { set /A %mm1%=mm-1 echo mm is %mm% echo mm1 is %mm1% }
I have been TESTED with using {} but DOS gave the error msg.
THANKS, I assume you are using WINDOWS cmd.
if "%mm%"=="01" ( set /A %mm1%=mm-1 echo mm is %mm% echo mm1 is %mm1% )
should work hope it helps uliIf i am not mistaken, the first bracket after a multiple line if statement is after the condition
eg
Code: [SELECT]if "%mm%"=="01" ( <--here .... .... )
pls correct me if i am wrong. You are right. Thanks for correcting my mistake. I modified my posting.
uliThanks uli. It did work. Thanks a lot.
Quote I assume you are using windows cmd.
if "%mm%"=="01" ( set /A %mm1%=mm-1 echo mm is %mm% echo mm1 is %mm1% )
should work hope it helps uli
|