Discussion:
Xcopy with a wait betwen files?
(too old to reply)
Angie
2005-02-23 17:03:46 UTC
Permalink
Hi there,

I'm trying to create a batch file which will copy all files from a
particular directory structure, into another area with similar
directory structure
ie:
c:\backup\inputdata1\book1\*.*
c:\backup\inputdata1\book2\*.*

into

c:\inputdata1\book1\*.*
c:\inputdata1\book2\*.*

Normally, I would use xcopy with some appropriate switches... but, I
need to sleep for a few seconds in between each file.

I've been looking at some scripts which use dir, and a for loop to
echo. the copy commands to another file, but I'm stuck on trying to
create the target filename from the source filename.

Another idea I had was to use the /w switch on xcopy, but I can't
figure out how to pipe in an enter....

Does anyone have any suggestions??
Angie
a***@sympatico.ca
2005-02-23 18:09:07 UTC
Permalink
Woops... I meant the /p switch on xcopy...
a***@sympatico.ca
2005-02-23 18:46:24 UTC
Permalink
Ok... Murphy's law prevails...
as soon as I post the question, I figure it out...
Thanks anyways...

by the way, I'm using scripts which echo copy commands, and sleep
commands, and use the subst command to map my source directory from a
convenient point, where the path can also be used to generate the
target directory...

I'm sure there's something more elegant than this... but, this'll do
for me for now...
Thanks anyways!
Angie
Richard Bonner
2005-02-24 01:18:16 UTC
Permalink
Post by Angie
I'm trying to create a batch file which will copy all files from a
particular directory structure, into another area with similar
directory structure
c:\backup\inputdata1\book1\*.*
c:\backup\inputdata1\book2\*.*
into
c:\inputdata1\book1\*.*
c:\inputdata1\book2\*.*
Normally, I would use xcopy with some appropriate switches... but, I
need to sleep for a few seconds in between each file.
*** Try relaxation techniques. Oh , you mean the *operation* has
to sleep... (-:

Try XXCOPY's " /WS " or " WE " feature, although I think the delay is
for the operation, not for each file. However, a FOR-IN-DO loop might be
incorporated to do what you want.
Post by Angie
I've been looking at some scripts which use dir, and a for loop to
echo. the copy commands to another file, but I'm stuck on trying to
create the target filename from the source filename.
*** I think XXCOPY "LOG" feature may be of assistance.
Post by Angie
Another idea I had was to use the /w switch on xcopy, but I can't
figure out how to pipe in an enter....
Angie
*** As you corrected, you meant " /P ". However, piping ENTER to either
will negate them altogether. I would think the delay would be so minuscule
as to be unnoticeable.

Richard Bonner
http://www.chebucto.ns.ca/~ak621/DOS/

Loading...