(For Informational Purposes - always hire a professional)
Common Dos Command
It is possible to lose files by mistake, it is good practice to make backup
copies of your most valuable files. Use the COPY command to create the backup.
To change the default drive, simply type the letter of the your choice.
- C> A: [enter]
- Changes the default drive from C to A.
- A> C: [enter]
- Changes the default drive from A to C.
Once you have located the directory you want, you may move from directory to directory using the CD
command (change directory)
The COPY command can be used both to copy files from disk to disk or to create
a second copy of a file on a single disk.
- C> cd dir1
- Moves you to the directory called 'dir1'
- C> cd \dir1\sub1
- Moves you to the directory called 'sub1' under the directory called
- C> cd ..
- Moves you up one level in the path.
- C> cd \
- Takes you back to the root directory c:
The key to use this command correctly is to remember that the first file
specified after the COPY command is the source file, the second is
the target:ehp1 file. The source is the file to be copied.
The target will be the location and name of the new file. If the
file name and extension are omitted after the target's drive specification,
the new file will have exactly the same name as the source file.
The DIRECTORY command lists the names and sizes of all files located on a particular disk.
- C> copy c:file1.exe a:
- Copies the file 'file1.EXE' from the C drive to the A drive and gives
it the same name.
- C> dir a:
- Shows directory of drive A
- C> dir b:
- Shows directory of drive B
- C> dir \abc
- Shows files in a subdirectory on drive C (default)
- C> dir
- Shows directory of drive C
- C> dir /w
- Shows directory in wide format, as opposed to a vertical listing.
Two little characters, '*' and '?', will make your life with computers much easier. Their use is
- C> dir a:*.ex
- Lists all files on the A drive with an extension of 'EXE'.
- C> dir b:file1.*
- Lists all files on the B drive with a filename of file1'.
The ERASE command deletes specified files.
You must format new disks before using them on the IBM computers. The format command checks a
diskette for flaws and creates a directory where all the names of the diskette's files will be
- C> erase a:myfile.txt
- Erases the file MYFILE.TXT from the diskette in the A drive. If no
drive specification is
After entering this command, follow the instructions on the screen. When the FORMAT
operation is complete, the system will ask if you wish to FORMAT more diskettes.
If you are working with only one diskette, answer N (No) and carry
on with you work. If you wish to FORMAT several diskettes, answer Y
(Yes) until you have finished formatting all your diskettes.
- C> format a:
- Formats the diskette in the A drive.
- C> format b:
This command creates a new directory.
The RENAME command permits users to change the name of a file without making a copy of it.
- C> mkdir mine
- Creates a directory called 'MINE'
This command is very simple to use, just remember two points: the file name and extension must be
complete for the source file and no drive specification is given for the target. Renaming can only occur on
a single disk drive (otherwise COPY must be used).
- C> ren a:goofy.txt pluto.txt
- Changes the name of 'GOOFY.TXT' on the A drive to 'PLUTO.TXT'.
This command removes a directory. It is only possible to execute this command if the directory you
wish to remove is empty.
- C> rd mine
- Removes directory called 'MINE'.