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

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -