Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

What return values do the cmd.exe commands return?

$
0
0

I have only begun to use PowerShell which I find way to complex at this time so for me the cmd.exe batch file does much of what I need, but I tried to find a list of the errorlevels returned by each of the commands but I couldn't find it. I found descriptions of the command here: http://technet.microsoft.com/en-us/library/cc772390(v=ws.10).aspx but they don't give return values.

In particular I was looking for the return value of the find command. I assumed 0 meant found, and 1 meant not-found, but nothing told me that. It could be that 0 only meant the find did not return an error, irrelevant to the finding something or not, when 1 might mean find exited prematurely (such as when using find in a protected directory). I since found that 0 means found and 1 means not found, but what if I needed to plan for how to handle exit codes other than those two?

I'm looking with respect to W7 Pro for return values for all the commands, not just find. I did a search in this forum and "on the net" before I submitted this question, but with more than 108K results just in this forum, I found I didn't have the time to look through them all. "On the net" gave me some results for specific commands, but not all of them.

So, can someone point me to a list of cmd.exe command return codes for W7?


Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>