The subject condition can happen, due to a parser error in Windows NT.
If you invoke a batch file, as an argument to another command, and have a space at the end of the string, the parser causes one of the above conditions. Example:
cmd /c "filename.bat "
The trailing space, within the quote marks, causes the parser to misbehave.