Deleting file after progeam execution in batch -


i having simple question, having simple batch script:

for /l %%x in (1, 1, 3) start /wait c:\some.exe -verbose c:\somelog.txt del c:\somelog.txt  

after each execution file creates log, , want remove log before next loop execution, execution works fine when add del command having problems, looks log being deleted early.

is there possible way delay del command ??

when running multiple command nest them readability.

for /l %%x in (1, 1, 3) (     start /wait c:\some.exe -verbose c:\somelog.txt      del c:\somelog.txt  ) 

you way well

for /l %%x in (1, 1, 3) (start /wait c:\some.exe -verbose c:\somelog.txt &del c:\somelog.txt) 

but not mean executable respecting wait option. many programs not. use exe directly without using start @ all.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -