"Unexpected Do"
Posted: 28 Oct 2011 15:11
The following, from within a batch script:
echo for %%A in ("DM.txt") do if %%~zA equ 0 del DM.txt >> exec-ds.bat
Generates:
"do was unexpected at this time"
However if I run it manually, no error is generated and exec-ds.bat executes as expected. Any suggestions?
Thanks,
Al
echo for %%A in ("DM.txt") do if %%~zA equ 0 del DM.txt >> exec-ds.bat
Generates:
"do was unexpected at this time"
However if I run it manually, no error is generated and exec-ds.bat executes as expected. Any suggestions?
Thanks,
Al