The rmdir command (OS Windows) gives on completion status values:
Possible exit status values are: 0 - Successful completion. 1 - Failure because directory is not a directory, or because it still contains files or subdirectories. 2 - Failure because of an invalid command line option, or no directory names specified. But how to take \ process? Or am I reading something wrong? Suppose in the implementation for a message to the user about the error, and in the positive case for the message about the correct completion of the operation?
For example, with ErrorLevel everything is more or less clear: if ErrorLevel 1 goto Error
What about rmdir? How to, say, redirect on error?