Professional Documents
Culture Documents
External
• Internal • External
– DATE – FORMAT
– FDISK
DOS COMMANDS – TIME
– VER – SYS
– PROMPT – ATTRIB
You will use these more than you think! – PATH – COPY
– DIR – XCOPY
– CD, MD ,RD – DELTREE
– DEL
– EXIT
1
VER PROMPT [ PARAMETERS]
• Displays the current version number of DOS • Usually set to:
• No parameters – $P – to give the current directory
– $G – to give the “greater than” symbol after the
current directory
• Check out PROMPT /? To get other
parameters.
• Demo
Making a Directory
Interesting DOS Questions MD [path\]name[\]
(or MKDIR)
• What happens when one does: • Used to create a new directory
– DIR C: vs. DIR C:\ ? • Path\ when not present is assumed to be the
– Why current directory
– Can one do a DIR on the a: drive from the c: • Do not have to be within the directory
drive? where new directory will reside
– What is the difference between a DIR C: from
the D: drive and a DIR C:\ from the D: drive?
2
Remove Directory CD PATH
RD [path\]name[\] (CHDIR)
(or RMDIR)
• Used to switch from the current directory to
the directory described in the path part of the
• Used to delete or remove the directory name statement.
• When Path\ not present is considered to be
• Valid abbreviations (for all directory
the current directory commands):
• Can not delete directory with any contents – Single dot . —relative to current directory
• Do not have to be within the directory being – Double dot .. —relative to parent directory
removed – Back slash \ — The preceding is either the root
directory or a directory name
3
Help with DOS External
External DOS Commands
Commands
• FORMAT • SCANDISK • From the command prompt in WINDOWS:
• FDISK • CHKDSK – Command name /?
• SYS • DELTREE – This will list the various switches and options
• ATTRIB • DEFRAG – Note: c:\windows\command must be within the
• COPY • DEBUG path specification.
• XCOPY • DISKCOPY • From the command prompt in older DOS:
– HELP [DOS COMMAND NAME]
– The Help file and the QBASIC.EXE are necessary
FORMAT
FDISK
• Used to make either floppies or hard disks
usable by DOS • Used to partition a hard disk
• Creates on the disk: • Creates and writes to Hard Disk two copies
– Master Boot Record—“Size media” of the “partition table”
– Sectors, tracks and cylinders • Undocumented /MBR switch to restore
– Fills Clusters with F6h and numbers them backup copy of partition table
– Two copies of the FAT table
– Root directory
4
COPY filename1 filename2 XCOPY or XCOPY32
• Both filenames may have a path given • Used to copy entire directories &
• No path implies the current directory subdirectories
• filename1 is the source file copied • Will copy hidden files with /H switch
• filename2 is the destination filename • Check /? Switch to get full switches
• Wildcards frequently used
• Lots of other switches /?
CHKDSK DELTREE
• Like SCANDISK but only runs in DOS • Used to delete an entire directory & all of
• Can find errors, but does not fix them its sub-directories
• A legacy from older DOS • Powerful but dangerous
• Be careful with this one!
5
DEFRAG DEBUG
• Used to make a hard disk run faster • Used to manipulate and view very specific
• Causes all clusters of a file on a hard disk to parts of memory or disks
be contiguous • Discussed later in this course.
• May take a lot of time!
End