The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,776 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 ss64.com.

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

–jeroen

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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
%d bloggers like this: