Command

Meaning

cls

Clears หน้าจอ  MS-DOS Prompt window และ prompt จะอยู่บรรทัดแรกของหน้าจอ

cd DIRNAME

MS-DOS ทำงานอยู่ directory อันใดอันหนึ่ง directory ปัจจุบันจะเห็นเป็นส่วนหนึ่งของ prompt บนหน้าจอ เช่น  "C:WINDOWSDesktop>" หมายความว่า directory ปัจจุบัน คือ "Desktop" directory  ซึ่งอยู่ภายใน Windows directory เราใช้คำสั่ง cd เพื่อเข้าถึง directory อื่นเพื่อให้เป็น current directory (cd=change directory) ตัวอย่างการใช้คำสั่ง; "cd perl" will make "perl" the current directory. To get to the "root" of your c: drive, type "cd ".

dir
dir DIRNAME

"dir" lists the contents of the current directory. "dir DIRNAME" lists the contents of the DIRNAME directory, e.g.: "dir perl" or "dir mystuff". If you add " /p" to the end of the command, such as "dir mystuff /p", then the output will pause after each screenful and wait for you to press any key (e.g.: Enter).

notepad FILENAME

Starts the Notepad text editor program and opens the file named FILENAME. If the file does not exist, Notepad will ask you if you want to create a new file with that name. For example, "notepad allposters.ini" starts Notepad and opens the file allposters.ini located in the current directory. If you want to edit a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "notepad wwwallpostersallposters.ini".

type FILENAME

Displays on the screen the contents of the file named FILENAME. For example, "type ae.key" displays the contents of the file ae.key located in the current directory. If you want to display a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "type wwwaeae.key". Note: If the contents of the file is more than one screenful, then you should use the "more" command instead otherwise the text will scroll off the top of the window.

more FILENAME

Displays on the screen the contents of the file named FILENAME. For example, "more ae.ini" displays the contents of the file ae.ini located in the current directory. If you want to display a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "more wwwaeae.ini". Note: If the contents of the file is more than one screenful, then "-- More --" will appear after each screenful and your computer will wait for you to press the Enter key to continue or press q (or Ctrl-C) to quit.

start .

The command "start ." (the . is required, and there must be a space before it) causes the current directory to be shown graphically as a folder.

copy NAME1 NAME2

Copy the file that has name NAME1 to NAME2. The file NAME1 is unchanged. If a file with the name NAME2 already exists, you will be asked if you want to overwrite the current NAME2 file. For example, "copy allposters.ini allposters.bkp" copies allposters.ini to allposters.bkp.

ren NAME1 NAME2

Rename the file that has name NAME1 to NAME2. If NAME2 already exists, then an error message is shown instead. For example, "ren allposters.ini allposters.bkp" renames allposters.ini to allposters.bkp.

del FILENAME

Delete file that has the name FILENAME. The file FILENAME is immediately deleted without any confirmation.

WARNING: Do not delete anything unless you know exactly what you are doing. MS-DOS does not have a "Recycle Bin" so you cannot recover files deleted with the "del" command.

WARNING: The character * is the wildcard character and allows you to delete all matching files by using one command, such as "del *.tmp" deletes all files that end with ".tmp" in their filename. All matching files are immediately deleted without any confirmation and cannot be recovered.

md DIRNAME

Make a new directory named DIRNAME inside the current directory. If you want to make the new directory inside a directory other than the current directory, then use the "cd" command first. For example, "md allposters" makes a new directory called "allposters" inside the current directory.

exit

Closes the MS-DOS Prompt window. Equivalent to clicking on the "X" close button (top right of the window frame).