Search code examples
batch-filecopy-paste

Copy Paste Files with delay


I have a script which copy files and paste. I just want to have a delay which paste files in order. Paste first file - 10 sec wait - Paste second file - 10 sec delay - Paste third file -...

This is my script which copy all files

set source=C:\Users\kco2bu\Desktop\Deneme\Copy
set destination=C:\Users\kco2bu\Desktop\Deneme\Paste
xcopy %source% %destination% /y

Solution

  • copy each file on it's own:

    set "source=C:\Users\kco2bu\Desktop\Deneme\Copy"
    set "destination=C:\Users\kco2bu\Desktop\Deneme\Paste"
    for %%a in ("%source%\*") do (
      xcopy "%%~fa" "%destination%" /y
      timeout -t 10 >nul
    )