
"Bad command or file name" is a common and ambiguous
error message
An error message is information displayed when an unforeseen occurs, usually on a computer or other device. On modern operating systems with graphical user interfaces, error messages are often displayed using dialog boxes. Error messages are us ...
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 oper ...
and some other operating systems.
COMMAND.COM
COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
, the primary user interface of MS-DOS, produces this error message when the first word of a command could not be interpreted. For MS-DOS, this word must be the name of an internal command, executable file or
batch file
Batch may refer to:
Food and drink
* Batch (alcohol), an alcoholic fruit beverage
* Batch loaf, a type of bread popular in Ireland
* A dialect term for a bread roll used in North Warwickshire, Nuneaton and Coventry, as well as on the Wirra ...
, so the error message provided an accurate description of the problem but 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 was changed for clarity.
Windows NT
Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system.
The first version of Wi ...
displays the following error message instead (where "
foo
The terms foobar (), foo, bar, baz, 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 variables, ...
" is replaced by the word causing error):
Some early
Unix shell
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system t ...
s produced the equally cryptic "" for the same reasons. Most modern shells produce an error message similar to "".
See also
*
Abort, Retry, Fail?
"Abort, Retry, Fail?" (or "Abort, Retry, Ignore?") is an error message found in DOS operating systems, which prompts the end-user for a course of action to follow. Although welcomed by some, the message also has been cited as an example of po ...
*
List of DOS commands
This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list.
In DOS, many standard system commands were p ...
References
Computer error messages
DOS on IBM PC compatibles
{{DOS-stub