[<<]Message[>>]    [<<]Author[>>]        Subject        [<<]Thread    

Number : 3462 Date : 2003-01-06 Author : Kan Yabumoto Subject : Re: Exit code for creating directory structure Size(KB) : 2
In one sense what the exit code is showing is correct. The Exit code 100 is by itself a sign of proper execution. For that matter, even exit code 101 (one file failed) should not be viewed as an error, either. It is an exit code which contains more distinct info than being bunched together with other code value such as 0. That is, the common processing technique using IF ERRORLEVEL ... gives the impression that anything other than 0 is an error. But, that's just how the batch file processing keyword was chosen. In our opinion, an exit code is just an exit code. Even with the value 1 for the switch /ER, it is by no means an error. As long as the definition of the meaning is clear to the user (whether or not it is most intuitive), the user should be able to process the exit code properly. But, we will give it a little more thought on this particular case. Thanks for your feedback. Kan Yabumoto ========================================================== At 2003-01-06 09:44, you wrote: >In using xxcopy to duplicate a directory structure, although it seems >to work properly the exit code return is 100 or 1 when using /ER. >This differs from the expected behaviour I think. >for e.g. using xxcopy /T /I /E ROOT1 ROOT2 for the following empty >directory structure >ROOT1 >|_SUB1 >|_SUB2 >\_SUB3 > >gives.. >XXCOPY == Freeware == Ver 2.82.7 (c)1995-2002 Pixelab, Inc. >---------------------------------------------------------------------- >D:\ROOT2 >D:\ROOT2\SUB1 >D:\ROOT2\SUB2 >D:\ROOT2\SUB3 >---------------------------------------------------------------------- > Directories processed = 4 > Total data in bytes = 0 > Elapsed time in sec. = 0.015 > Action speed (MB/min) = 0 > Files copied = 0 > Directories created = 4 > Exit code = 100 (No files were found to copy) > >..when using /ER >Exit code (with /ER) = 1 (No files were found to copy) > > >Shouldn't the exit code be 0 ? The reason given for exit code 1 is >that no files were found to copy, but the /T parameter is used to >only copy a directory structure ignoring the files.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.