469,290 Members | 1,866 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

command exit status on windows

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
Jul 18 '05 #1
2 6893
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
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

Jul 18 '05 #2
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
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

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Andreas Paasch | last post: by
reply views Thread by Sami Viitanen | last post: by
1 post views Thread by xtra | last post: by
8 posts views Thread by drose0927 | last post: by
2 posts views Thread by loial | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.