simple batch file
Posted: 13 Jan 2016 04:24
I am making a script to move all files from "C:\temp\source" to "C:\temp\destination".
While for every 7 files copied, I would like to sleep for 20 seconds.
I've been working so hard but it still doesn't work.
Below with my batch, could anyone give me some idea?
Thanks a lot!
While for every 7 files copied, I would like to sleep for 20 seconds.
I've been working so hard but it still doesn't work.
Below with my batch, could anyone give me some idea?
Thanks a lot!
Code: Select all
@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"
)
)