
"Bad command or file name" is a common and ambiguous
error message in
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
.
COMMAND.COM produces this error message when the first word of a command could not be interpreted. Because this word must be the name of an internal command, executable file or
batch file
A batch file is a Scripting language, script file in DOS, OS/2 and Microsoft Windows. It consists of a series of Command (computing), commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain a ...
, the error message provided an accurate description of the problem, but easily confused novices. The wording gave the impression that filenames provided as arguments to the commands were damaged or invalid. Later, the wording of the error message was changed for clarity.
Windows NT
Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
displays the following error message instead (where "
foo
The terms foobar (), foo, bar, baz, qux, quux, and others are used as metasyntactic variables and placeholder names in computer programming or computer-related documentation. - Etymology of "Foo" They have been used to name entities such as Var ...
" is replaced by the word causing error):
Some early
Unix shell
A Unix shell is a Command-line_interface#Command-line_interpreter, command-line interpreter or shell (computing), shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command languag ...
s produced the equally cryptic "
foo: no such file or directory" again accurately describing what is wrong but confusing users. Most modern shells produce an error message similar to "
foo: command not found".
See also
*
Abort, Retry, Fail?
"Abort, Retry, Fail?" (or "Abort, Retry, Ignore?") is an error message found in DOS operating systems, which Command-line interface#Command prompt, prompts the user (computing), end-user for a course of action to follow. Although an improvement ...
*
List of DOS commands
This article lists notable commands provided by the MS-DOS disk operating system (DOS), especially as used on an IBM PC compatible computer. Other DOS variants as well as the legacy Windows shell, Command Prompt (cmd.exe), provide many of these c ...
References
Computer errors
DOS on IBM PC compatibles
{{DOS-stub