command exit status on windows

S

Sami Viitanen

Hello,

Is there a way to check if a command executed in ms-dos returns 0 (success)
or greater than 0 (fail) ?

In Unix the module commands.getstatusoutput returns exit status..


Thanks in advance.

-SV
 
F

Felix McAllister

On Windows NT, 2000, 2003 and XP this generally works as well, although you'll find that some command line applications specifically written for Windows don't bother with a return code.

I can't comment about Windows 95, 98 or ME.

The os.system call (which works on both Unix and Windows) returns the correct status code.

Felix
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top