DOS Commands :
Directory-
Microsoft DOS dir command
About dir
The dir command allows you to see the available files in a directory. You will see the
word “ Volume ” in this information. Volume is simply another word for a disk that
the computer has access to. Your hard disk is a volume, your floppy disk is a volume
and a server disk (hard disk served over a network) is a volume.
Availability
The dir command is an internal command and is available in the below Microsoft
operating systems.
All versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
C:\>dir
Examples
dir
Lists all files and directories in the directory that you are currently in.
dir : more
Will display the directory one screen at a time.
dir /a
Lists all files and directories including hidden files and directories.
dir /p
If the directory has a lot of files and you cannot read all the files as they scroll
by, you can use this command and it will display all files one page at a time.
dir /w
If you don't need the info on the date / time and other information on the files,
you can use this command to list just the files and directories going horizontally,
taking as little as space needed.
Change Directory-
Microsoft DOS cd command
About cd
CD (Change Directory) is a command used to switch directories in MS-DOS. For
example, if you needed to run Program Files from DOS, you would type:
C:\>cd Program Files - Changing the directory to Program Files;
Availability
The CD command is an internal command and is available in the below Microsoft
operating systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
C:\>cd \ [drive:] \ [path]
Examples
cd\
Goes to the highest level, the root of the drive.
cd windows
If present, would take you into the Windows directory.
Create And Edit Files-
Microsoft DOS edit command
About edit
Edit allows a user to view, create, or modify their computer files.
If you are running a MS-DOS version 4.x or lower or you are unable to find edit.com on
your hard disk drive, you can also use the below command to create a file.
C:\>edit [name of file.(extension)]
Once you have entered the above command this will bring you to a screen where you
can write the info to be put in the file.
Once you have typed all the lines you wish to have in the file, press and hold
Alt + F + S. This will save the file . To exit press Alt + F + X. This will come back to the
DOS commands screen.
Availability
The edit command is an external command that is available in the below Microsoft
operating systems.
MS-DOS 5.x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Syntax
C:\>edit [name of file.(extension)]
Make Directory-
Microsoft DOS md command
About md
Allows you to create your own directories in MS-DOS.
Availability
The md and commands are internal commands that are available in the below
Microsoft operating systems.
All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Syntax
C:\>md test
The above example creates the "test" directory.