If you examine the output of "shadowspawn /?", you'll find this little
nugget [1]. Hopefully that gives you what you want. If not, let us
know, and we'll see what we can do to address your needs. In short,
you can subtract 32768 from the error code to get the (nonzero) exit
code of robocopy.
[1]
If there is an error while processing (e.g. ShadowSpawn fails to
create the shadow copy), ShadowSpawn exits with status 1.
If there is an error in usage (i.e. the user specifies an unknown
option), ShadowSpawn exits with status 2.
If everything else executes as expected and <command> exits with
status zero, ShadowSpawn also exits with status 0.
If everything else executes as expected and <command> exits with a
nonzero status code n, ShadowSpawn exits with status n logically OR'ed
with 32768 (0x8000). For example, robocopy exits with status 1 when
one or more files are Scopied. So, when executing
shadowspawn C:\foo X: robocopy X:\ C:\path\to\backup /mir
the exit code of ShadowSpawn would be 32769 (0x8000 | 0x1).
On Wed, Nov 2, 2011 at 12:19 PM, Leonastas <mkmas...@gmail.com>
wrote:Exit Status:
Is the wording confusing? If you made the mistake, other people may as
well. Suggestions for how we can improve that would be welcome.
> By the way, if you
> or anyone else is interested in my Hobocopy or ShadowSpawn/Robocopy
> Powershell backup scripts, let me know and I will post them. If you
> desire, I would also be willing to have them included with the
> ShadowSpawn/Hobocopy distribution as example scripts (I have no
> objections to the license file I see included with the source code),
> if I'm not getting too ahead of myself on that.
I for one would definitely be interested in seeing people's
ShadowSpawn/Robocopy scripts. I could totally see putting them on the
wiki or in an examples directory.
[1] https://github.com/candera/shadowspawn/wiki/PowerShellPlusRobocopy