Trying To Delete Text Files After Printing 追蹤

0
Avatar
Legacy Poster

Hi.

 

Using Windows and Commander, i set up some operating system rules in order to copy/del/rename the file used as database:

 

copy %Trigger File Name% C:\Temp\%Trigger Base File Name%.old
del %Trigger File Name%
ren "C:\Temp\%Trigger Base File Name%.old" "%USERNAME%_%date:~6,4%-%Date:~3,2%-%Date:~6,2%_@_%Time:~0,2%h%Time:~3,2%m%Time:~6,2%s.old"
 

 

these 3 lines are in 3 separated lines of operating system Command and all have the Command options all flagged (wait, stop, log).

 

sometimes it works, sometimes the DEL action fails... no real explanation, just probably the file is not released by the previous task.

 

is there any way to put a sleep/pause/hold for 4-5 seconds between each Command ?

 

thanks!

 

Maurizio

1 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

There are a few things you could do, one is to execute a ping echo request on the loopback address:

 

cmd.exe /C ping -n 5 127.0.0.1 

登入寫評論。