|
Answer» Hi,
I am writing a simple script. My aim is to copy every files in "C:\test\source" to "C:\test\destination". And for every 7 files copied, I would like to sleep 20 SECONDS. I have been trying so hard but it still fails. Can anyone help? Thanks a lot!
@ECHO OFF ECHO.
set i=0
for /f %%f in ('dir /B C:\test\source') do ( %i%=%i%++ MOVE /y file C:\test\destination if "%i%" %% 7 =="0" ( echo "Copied and sleep now" sleep 20 ) else ( echo "Copied" ) ) This is posted on Dostips also, where I gave ADVICE to read the help for /a in the set command.
|