Bad command or file name
This article needs additional citations for verification. (February 2015) |
"Bad command or file name" is a common error message in Microsoft's MS-DOS and some other operating systems.[1] It is occasionally used as an example of a computer message that is perfectly accurate yet confusing to the average user[citation needed].
COMMAND.COM produced the message "Bad command or file name
" when the first word of a command could not be interpreted. For MS-DOS, the first word of a command was the name of an internal command, external command, executable file or batch file,[2] therefore the error message provided an accurate description of the problem, yet easily confused novices. Though the source of the error was often a mistyped command, the wording gave the impression that files named in later words were damaged or had illegal filenames. Later, the wording of the error message displayed to the user was changed to be less ambiguous, as both OS/2[citation needed] and Windows NT output foo is not recognized as an internal or external command, operable program or batch file.
where foo
is the mistyped first word.[3]
Some early Unix shells produced the equally cryptic "foo: no such file or directory
" for the same reasons. Most modern shells produce separate error messages similar to foo: command not found
and foofile: No such file or directory
for unrecognized commands, though some still produce the earlier message.[4]
See also
References
- ^ Jim Cooper, (2002). Using MS-DOS 6.22. Que Publishing. ISBN 9780789725738
- ^ "Instructrions:". MSDN. Microsoft. Retrieved March 8, 2015.
- ^ "From Command Prompt: "The Name Specified Is Not Recognized..." :". Microsoft. Microsoft. Retrieved March 8, 2015.
- ^ A current example is tclsh with the command "exec nosuchcommand"