Copy files one at a time w/time interval

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
bildol
Posts: 1
Joined: 18 Feb 2012 14:37

Copy files one at a time w/time interval

#1 Post by bildol » 18 Feb 2012 14:50

Requesting help please batch move one file at a time with 2 minute interval from one directory to another. Don't care about file name.

Thanks!!

aGerman
Expert
Posts: 4740
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Copy files one at a time w/time interval

#2 Post by aGerman » 18 Feb 2012 14:55

bildol wrote:Don't care about file name.

What does that mean? Is there only one file in the directory or should the script move each file in this directory?

Regards
aGerman

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Copy files one at a time w/time interval

#3 Post by Squashman » 18 Feb 2012 14:58

Which version of windows are you running?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Copy files one at a time w/time interval

#4 Post by foxidrive » 18 Feb 2012 20:53

Untested:

Source is: c:\folder-one
Target is: c:\folder-two

Code: Select all

@echo off
pushd "c:\folder-one"
for /f "delims=" %%a in ('dir /b /a-d') do (
echo moving "%%a"
move /y "%%a" "c:\folder-two"
ping -n 120 localhost >nul
)
popd

Post Reply