how to "see" DOS errorlevel codes?

R

Rossman123

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...
 
J

J. Gleixner

Rossman123 wrote:
[...]
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");

By actually examining what system returns.

Try the documentation.

perldoc system
 
P

Paul Lalli

J. Gleixner said:
Rossman123 wrote:
[...]
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");

By actually examining what system returns.

Try the documentation.

perldoc system

perldoc -f system
is what J means, I'm sure.

Paul Lalli
 
J

J. Gleixner

Paul said:
J. Gleixner said:
Rossman123 wrote:
[...]
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");
By actually examining what system returns.

Try the documentation.

perldoc system

perldoc -f system
is what J means, I'm sure.

D-oah!.. Yep. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,607
Members
45,240
Latest member
pashute

Latest Threads

Top