Re: Is there a way to have Robocopy end if max retries are reached
- From: WB <WB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 2 Jun 2008 10:52:06 -0700
ROBOCOPY "Z:\TOOLS "D:\TOOLS" /E /w:15 /r:14 /TEE /LOG+:C:\TOOLS.LOG /NJS /NP
BTW: I recently had to replace two similar Robocopy commands with xcopy,
since Robocopy was only copying the sub-folders from the source to the
destination (it was not copying the files from the root of the source
folder). I'll post this as a seperate issue.
Thanks,
--
Bill Baker
"Pegasus (MVP)" wrote:
Batch files are quite good at enumerating files. If you.
post your typical robocopy command then I'll show you
how to arrange it so that each file is copied individually
and that the process terminates when the connection is
lost.
"WB" <WB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:38CFAA36-13C8-48BD-8D3C-D846CB3AE2DE@xxxxxxxxxxxxxxxx
Then I don't understand your reply. How can I copy each file individually
if
I don't specify the individual file names?
--
Bill Baker
"Pegasus (MVP)" wrote:
Why is it not an option? The batch file would not care how
many times it has to invoke robocopy.exe!
"WB" <WB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ABDEE964-B149-4A33-933E-B4F90917E68B@xxxxxxxxxxxxxxxx
Unfortunately I have hundreds of files being copied, so this is not
really
an
option. Seems like something that should have been part of Robocopy to
begin
with (just like the ability to move files).
--
Bill Baker
"Pegasus (MVP)" wrote:
"WB" <WB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8DE1634C-68CC-4BCE-A9E4-316A54ADA46C@xxxxxxxxxxxxxxxx
I'm using Robocopy with the following switches (with /E only when
copying
folders):
/E /w:15 /r:14 /TEE /LOG+:%LOGFILE% /NJS /NP
If a network connection is lost (i.e. if I unplug the cable), and
max
retries are reached, Robocopy moves to the next file in the folder
and
retires that one 14 times every 15 seconds. It repeats this for
every
file
in
the folder. For a folder with lots of files, this is a big waste of
time.
Also, if any files fail, and subsequent files get copied
successfully,
this
is still an overall failure (for most situations). I know that exit
codes
can
be used in this case, but it still doesn't make sense to me that it
should
attempt to copy subsequent files if there were any copying failures
at
all.
Is there any way to have Robocopy just stop the copying operation if
max
retires are reached on any file?
Thanks,
--
Bill Baker
Instead of using a wildcard for robocopy, you would have to write
a batch file that causes each file to be copied individually by
robocopy. You can then terminate the batch file when the
connection fails.
- Follow-Ups:
- Re: Is there a way to have Robocopy end if max retries are reached
- From: Pegasus \(MVP\)
- Re: Is there a way to have Robocopy end if max retries are reached
- References:
- Prev by Date: Re: ASCII chararters chart?
- Next by Date: Re: fix of help and support
- Previous by thread: Re: Is there a way to have Robocopy end if max retries are reached
- Next by thread: Re: Is there a way to have Robocopy end if max retries are reached
- Index(es):
Relevant Pages
|