The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,914 other followers

Robocopy Exit Codes: 0 and 1 usually mean success

Posted by jpluimers on 2012/10/08

Most console applications return 0 (zero) as success.

But sometimes there are multiple success result codes, and the success depends on what you want to do with them.

One example is RoboCopy.

The zero result code means that nothing happened: no error occurred and nothing was copied, because there was no need to.

But for most RoboCopy scenario’s result code 1 (one) is also success. It means that no error occurred and that one ore more files were copied.

In fact the RoboCopy result codes form a bitmap explained on

Most RoboCopy use cases will have [0,1] as the set off success result codes.


via: Robocopy Exit Codes.

3 Responses to “Robocopy Exit Codes: 0 and 1 usually mean success”

  1. David Gray said

    According to various Web pages, including the official documentation on TechNet, exit code zero means that nothing happened. I can prove that this is unequivocally FALSE. Copying a new file yields an exit code of ZERO.

  2. […] recent blog post of my friend Jeroen Pluimers about “Robocopy exit codes 0 and 1 usually mean success” reminded me of a problem I had with this fact a few years […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: