Tutorial of various MS-DOS commands. For instructions on how to
open a DOS command prompt window, see: How to Open Command Prompt.

Note: Click here for newer version of this tutorial

Monday, June 30, 2008

DOS Commands :: notepad

DOS Commands :: notepad

Although notepad is not a part of DOS, it is a useful command that you can use from a DOS command prompt window.

notepad
This command will cause the Windows Notepad text editor program to be run. This program is the same Windows Notepad program that is accessible in Windows via: Start > Programs > Accessories > Notepad

notepad filename
This command will cause the file named filename to be opened by the Notepad text editor. For example, notepad mylist.txt would open the mylist.txt file. If the file filename does not exist, Notepad will ask you if you want to create a new file with that name.

If you want to edit a file that is in a directory other than the current directory, then use the "cd directory" command first or specify the directory name as part of the filename, such as: "notepad \mystuff\ebooks\list.txt".

DOS Commands :: cd (change directory)

DOS Commands :: cd (change directory)

When you are using a Microsoft DOS command window, MS-DOS works on one directory at a time. The "current" directory is indicated as part of the command prompt.

For example, the command prompt "C:\mystuff\ebooks>" means that the current directory is the "ebooks" directory which is located inside the "mystuff" directory on the c: drive.

Use the cd command to make a different directory the "current" directory ("cd" is short for "change directory").

The command can be typed as either:

cd directory

or

cd drive:directory

For example, "cd \mystuff" will make "\mystuff" the current directory. To get to the "root" (top level directory) of your c: drive, type cd \

Note: To see what directories are available for you to cd into, use the dir command. And to make a new directory, use the md (or mkdir) command.

You can also type cd .. (the two dots are required) to back out one level out of the current directory. For example, if the current directory is "C:\mystuff\ebooks>" then typing cd .. will change the current directory to "C:\mystuff>"

DOS Commands :: cls

DOS Commands :: cls

When you are using a Microsoft DOS command prompt shell window, you can type cls to clear the window and move the command prompt to the top of the window. No files are changed by the cls command. The window display is merely cleared.

DOS Command :: Help

DOS Command :: Help

Open a Microsoft DOS command prompt shell window and type help and you will see a list of available commands with a brief description of each command.

To display detailed help information about command command, you can type either of the following help commands:

help command

or

command /?

For example, help dir and dir /? displays help information about the dir command.

How to Open Command Prompt

How to Open Command Prompt

To open a Microsoft DOS command prompt shell window, first click the Start menu at the lower-left of your computer's desktop and select "Run...".

Then if you are using Windows XP or Vista, type "cmd" (without the quotation marks) into the Run box and click "OK".

Otherwise, type "command" (without the quotation marks) into the Run box and click "OK".





After you click "OK", a DOS command prompt window will appear. Depending upon which version of Windows you are using, the DOS command window will look similar to these images:





See other postings here for a description of the commands that you can type into the DOS command prompt window.

To close the window, either type "exit" (without quotations marks) and press Enter, or click the X button in the top-right of the window frame.