Bad command or file name
Encyclopedia
"Bad command or file name" is a common error message
in Microsoft
's MS-DOS
and some other operating systems.
In command.com
, the message
and the Windows NT
(and newer) family use
Some early Unix shell
s produced the equally-cryptic
Error message
An error message is information displayed when an unexpected condition occurs, usually on a computer or other device. On modern operating systems with graphical user interfaces, error messages are often displayed using dialog boxes...
in Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...
and some other operating systems.
In command.com
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...
, the message
Bad command or file name
is produced if the user mistyped the first word of a command line. This first word must be either the name of built-in "command", or of an executable file or batch file. Therefore the error was printing what, to the programmer, was an accurate description of the problem: there was no such command and there was no such file. Novices, in general, had trouble understanding the message, so later operating systems changed it; for instance, OS/2OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...
and the Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
(and newer) family use
is not recognized as an internal or external command, operable program or batch fileBatch fileIn DOS, OS/2, and Microsoft Windows, batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter....
.
Some early Unix shell
Unix shell
A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems...
s produced the equally-cryptic
: no such file or directory
(because they searched for a file matching the command name and this is the strerror when a file of a given name is not found). Most modern shells produce : Command not found
.