How to abort robocopy on first error

Posted by Yurik on Super User See other posts from Super User or by Yurik
Published on 2009-10-07T21:32:32Z Indexed on 2010/03/15 12:00 UTC
Read the original article Hit count: 697

Filed under:
|
|
|

When using robocopy windows utility, what flags do I set so that robocopy aborts on the very first error it sees, similar to xcopy /dry command?

I need to mirror two dirs, and on occasion some files would be locked. I do not want robocopy to continue trying to copy files, or override the files that are not locked - rather the very first error should stop the whole copy process.

UPDATE:

I already have the /R set to 0 - unfortunately that it only applies to a single file, NOT to the whole copying process. Hence, the first file is ignored (instead of stopping the copying), but subsequent files are copied.

© Super User or respective owner

Related posts about shell

Related posts about Windows