|
Basic Guide to DOS
Playing with DOS commands |
In order to get along with DOS you should learn some basic
commands that you will use to display directory
content, copy, rename and delete files, plus
explore other directories (folders).
DOS has two sets of commands the ones called
shell commands or internal commands
like DIR, CLS, CD are interpreted by command.com
External commands are separate programs that
perform useful tasks such as
Format which is actually format.com
First we will review the basic shell commands or
internal commands
then take a look at the most popular external
commands.
DOS Shell (internal) commands
DIR
DIR displays the content of the current directory,
if you were at C:\Windows> and typed DIR,
Windows directory content is displayed
DIR has many switches and options you can use,
for instance typing
DIR *. will only display directories,
the wildcard is very useful because it acts as a filter excluding all files in the current directory.
DIR filename gets the size the of file and date of
creation.
CLS
CLS clears the screen moving the cursor back to
the top of the screen.
CD
or CHDIR
CD or Change Directory is a useful command for
exploring directories.
To display the content of the "Help" directory
inside "Windows" directory, type
CD help if you were at C:\Windows>
MD
or MKDIR
MD (Make Directory) is for creating directories,
it's the equivalent to Windows'
"New Folder" command.
If I want to create my own directory at C and
call it myfolder,
I simply type MD myfolder
RD
or RMDIR
To get rid of a directory,
type RD directoryname
DEL
or ERASE
DEL allows you to erase a file, but does not apply
to directories
so you could not type "Del directory"
You'd better use /P option when you're not sure which file(s)
you're deleting, this will prompt you for confirmation before
deleting any file
REN
or RENAME
Use REN or RENAME to rename a file just like in
Windows
type REN oldfilename newfilename
COPY
Allows you to copy a file from one location to
another or make copies of the same file.
TYPE
Use TYPE nameoffile to display the file content
on the screen. We will see later how to control the output.
Most shell commands have switches or options that
extend their capabilities giving your more control.
For instance using /P with Del will ask you to
confirm before deleting any file.
Add /O to DIR to sort files/folders alphabetically.
For the complete listing and usage of DOS Shell commands go to
Commands usage section.
|
|
|
Choose a Tutorial
What do you need ?
|