You are on page 1of 3

COMMAND AND USAGE DIR Displays the contents of a directory (folder).

Note: directory is the term used by DOS for what Windows calls a folder.

EXAMPLES

DIR displays all files and folders in the current directory. Folders are indicated in the list by <DIR>.Files are usually listed by name.

You can use the '*' and the '?' wildcards to DIR /P displays the contents a page at a search for a particular file. The? Character time, i.e. as many as will fit in your represents ONE character, and the * character command line window. Press any key to represents multiple characters. display the next page. DIR *.* lists all the files in a directory. DIR *.JPG displays all files with the extension JPG in the current directory and all subdirectories. DIR /S list the contents of all subdirectories. DIR /AH displays all hidden files.

CHANGE DIRECTORY (CD) When you change directory, the prompt changes, showing the path of the directory you are currently in. CD\ takes you to the top of the directory tree (typically to C :). CD.. moves you one level up the directory tree (i.e. up towards the root directory). CD <DIRECTORYNAME> takes you to that directory. You can use one or more subdirectory names, separated by \ e.g. CD WINNT\Media takes you to the directory C:\WINNT\Media To change to another path, type the full path with slashes. e.g. CD \WINDOWS\SYSTEM

CLS Clear the screen. MAKE DIRECTORY (MD)

CLS MD <NEWDIR> creates a new directory

Creates a new directory below the current one. (The command can also be written as MKDIR) REMOVE DIRECTORY(RD)

called Newdir.

Removes a subdirectory of the current RD <DIRECTORYNAME> directory. The directory you want to remove must be empty of all files. (The command can also be written as RMDIR) RENAME Rename a file. You must use the full file name including the suffix. HELP Displays DOS Help. For help on an individual HELP DIR displays information on the command, type HELP then the command for DIR command. which you want more information. TIME This lets you set your systems time. C:\>TIME The current time is: 22:53:30.76 Enter the new time: If time is to be changed can specify the new time or hit enter. DATE RENAME <OLDNAME.EXE> <NEWNAME.EXE>

C:\>date

This command lets you set your systems date. The current date is: 02-08-2011 You can just hit enter to not change it or you Enter the new date: (dd-mm-yy) can specify a new system date. If date is to be changed can specify the new date or hit enter. VER VER will tell you what version of DOS you are using. If you use this command in windows it will tell the windows version. VOL C:\>ver Microsoft Windows [Version 6.0.6000]

VOL will tell you the volume label of your hard drive or floppy disk C:\>vol Volume in drive C has no label. Volume Serial Number is 4AEA-61CE PRINT PRINT <LOGFILE.TXT> Prints the specified file COLOR Used to change the color Prints LOGFILE.TXT color 1 color 2

EDIT Used to create a file. TYPE It is used to view a file.

edit filename

type filename

DEL Used to delete a file.

del filename

TREE Graphically displays the directory structure of a drive or path.

tree

SCAN DISK

chkdsk

Disk diagnostic utility. It run a surface scan Checks the disks and display the status which finds and marks bad clusters on the report. disk.

You might also like