DOS commands are divided into two types: one is internal commands, and the other is external commands. Internal commands are in the essential file Command.com of DOS. External commands are placed on the disk (floppy disk, hard disk or CD - ROM) in the form of files with the same name as the external commands. When you type in a command, DOS first looks for it in Command.com, and executes it after finding it; if it is not found in Command.com, it looks in the current directory; if it is not found in the current directory, it looks in the search path you specified; if it is still not found, it will display "Bad command or file name", which is the most common error prompt message we see under DOS. Under DOS, there are three types of files that can be executed. The extensions of these three types of files are:.com,.exe,.bat. For example, the current directory is A:\, and there is an executable file Tw.exe in A:\hd. Because the current directory is A:\, when you type in Tw (you don't need to type in the extension for DOS commands), DOS first looks for Tw in Command.com to see if it is an internal command. (Of course, it can't be found because Tw is not an internal command). Then it looks for Tw in the current directory (that is, A:\). The current directory is A:\, and there is no Tw in A:\ (Tw is in A:\hd). At this time, if you haven't set the search path of executable files with Path, DOS will display "Bad command or file name". If you use Path = A:\; A:\hd, when DOS doesn't find Tw in the current directory (that is, A:\), it will look for Tw in the search path you specified (in this example, A:\hd). Because you have specified the search path, it will execute Tw and won't display "Bad command or file name". Another example: the current directory is C:\, when you type in Tw, DOS first looks for Tw in Command.com, if not found, it looks for Tw in the current directory (current directory is C:\), if not found, it looks for Tw in the set paths A:\ and A:\hd, if found, it executes it, if not found, it displays "Bad command or file name". In conclusion, the Path command is to set the search path for executable files, so that you can execute commands no matter in which directory (that is, as long as the DOS prompt appears) without having to enter into this directory. And Path itself is an internal command.