how to "see" DOS errorlevel codes?



The xcopy command in DOS returns the following codes on
error/success...

0 - Files were copied without error.

1 - No files were found to copy.

2 - The user pressed CTRL+C to terminate xcopy.

4 - Initialization error occurred. There is not enough memory or disk
space, or you entered an invalid drive name or invalid syntax on the
command line.

5 - Disk write error occurred.

How can I find out what code was returned, after I do an xcopy using
the Perl system command?
My code looks like this:
system ("xcopy /E /Y /F /I /D $source $destination");

Many thanks...

.



Relevant Pages

  • Re: Copy with Verify?
    ... Does the following only apply to the old real versions of DOS and not ... "VERIFY ON, COPY /V, XCOPY /V Commands Do Not Compare Data ... This information also applies to the VERIFY ON command. ...
    (microsoft.public.windowsxp.general)
  • Re: Xcopy behavior questions
    ... using a command line they both understand (I just remembered I have 6.22 ... XCopy is one of the rare ones in the XP help file. ... It's identical to Dos. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Why is XP so Dumb?
    ... Specifies the destination of the files you want to copy. ... Suppresses the display of xcopy messages. ... xcopy prompts you to specify whether ... Windows XP does not use this command. ...
    (microsoft.public.windowsxp.basics)
  • Re: Why is XP so Dumb?
    ... Specifies the destination of the files you want to copy. ... Suppresses the display of xcopy messages. ... xcopy prompts you to specify whether ... Windows XP does not use this command. ...
    (microsoft.public.windowsxp.basics)
  • Re: Portable Templates
    ... You can put a DOS batch file in your Programs Startup folder ... The following is from the XCOPY /? ... This may be overridden with /-Y on the command line. ...
    (microsoft.public.word.docmanagement)