Hi,
I am using SourceOffSite 4.0.2.
I want to check out file from command line by the use of SOSCMD.exe. For that I am executing a batch file that runs the command. Batch file is excecuted as a process.
How do I trace the Return code or Return Messages to know the result?
Thanks
Nilesh Leuva
SOSCMD Return Codes
Moderator: SourceGear
First, I'd highly recommend upgrading to 4.1 (which is free since you're using 4.0.2), since a lot of fixes were made to the return codes in 4.1. It's actually been simplified quite a bit - returning 0 for success and -1 for failure, regardless of the command.
If you are executing a single "get" command in the batch, the easiest thing to do is to either type "echo %errorlevel%" when it exits or add the same command to the batch so the errorlevel displays automatically when the batch finishes.
If there are multiple sos commands in the batch, you'll have to get a little fancier with your batch, either writing the errorlevels out to a file or files, or adding IF statements to check on the errorlevel and exit the batch if there's a failure.
If you are executing a single "get" command in the batch, the easiest thing to do is to either type "echo %errorlevel%" when it exits or add the same command to the batch so the errorlevel displays automatically when the batch finishes.
If there are multiple sos commands in the batch, you'll have to get a little fancier with your batch, either writing the errorlevels out to a file or files, or adding IF statements to check on the errorlevel and exit the batch if there's a failure.