Introduction
Entering Commands
Help!
File Names
Directories
Commands A-C
Commands D-F
Commands G-L
Commands M-Z
Wildcards
Command Line Buffer
Redirecting
Piping
More Keys
Tips, Tricks & Hints
Closing
Legal Notices

DOS Commands D-F

DATE - DEFRAG - DEL - DELTREE - DIR - DISKCOMP - DISKCOPY
DOSKEY - EDIT - ERASE - FASTOPEN - FC - FIND - FORMAT


DATE - Displays and sets the system date.

EXAMPLES:
DATE - Prompts you to input the date.
DATE MM/DD/YY - Changes the system date.
Substitute mm/dd/yy with the correct information.

TOP


DEFRAG - Reorganizes files on a specified drive to increase the search time.

Syntax - DEFRAG DRIVE: /SWITCHES
EXAMPLES:
DEFRAG - Alone Prompts you with a menu.
DEFRAG C:/B - Runs Defrag on drive C and reboots the system
when complete.
SWITCHES:
/F - Arranges files so their are not any empty spaces.
/U - Does not reallocate defragemented files.
/B - Restarts your computer when DEFRAG is complete.
/V - Verifies that defraged files match the original
file image in memory.
/SKIPHIGH - Forces DEFRAG to run from conventional
memory,upper/high is the default.
/LCD - Forces LCD display, for laptops.
/BW - Forces black and white display.
/G0 - Disables graphic mouse and character set.
/H - Allows DEFRAG to relocate hidden files.
/S:order - Sorts files in directories by a certain order.
EXAMPLE:
DEFRAG /S:N - This would run DEFRAG with the specified N order.
ORDERS:
N - Alphabetically by name.
N- - Reverse alphabetically by name.
E - Alphabetically by extension.
E- - Reverse alphabetically by extension.
D - Date and time ascending.
D- - Date and time descending.
S - Size: smallest to largest.
S- - Size: largest to smallest.

When you run DEFRAG alone a menu will come up and will ask for the drive to DEFRAG. Choose the drive then the computer will make a suggestion. Follow the suggestion or choose configure. If you choose configure then make your choice and select begin optimization.

TOP


DEL - Removes files from the hard drive(s) and floppy drive(s).

Syntax - DEL DRIVE:\PATH\FILE(S) /SWITCHES
EXAMPLE:
DEL C:\MARIO\*.* /P - This would delete all the files in the MARIO directory &
ask permission for each file before it actually deletes it.
SWITCHES:
/P - Displays each file one at a time and asks for
confirmation before deleting.

If you type DEL *.* alone you will be asked if you are sure if you want all the files deleted. If you are DO just enter Y, if you DO NOT then you should enter N.

Wildcards can be used with this command.

TOP


DELTREE - Deletes a directory, the files in the directory & any subdirectories that may be located in it.

Syntax - DELTREE /SWITCH DRIVE:\DIRECTORY
EXAMPLE:
DELTREE C:\MARIO - This would delete the MARIO directory and all the
files and subdirectories in it.
DELTREE/Y C:\MARIO - This does the same but does NOT ask permission.
SWITCHES:
/Y - Suppresses prompt that asks you to confirm that
you want to delete the directory.

Use EXTREME CAUTION when using this command!

TOP


DIR - Displays directories and files.

Syntax - DIR DRIVE:\PATH\FILE(S) /SWITCHES
EXAMPLES:
DIR - Displays all files and directories in current location.
DIR A: - *Displays all files and directories on the A: Drive.
DIR C:\DOS - *Displays all files and directories in the DOS directory.
DIR C:\DOS/P - *Displays all files and directories in the DOS directory
one screen at a time.

*Doesnt matter what drive or directory you are in.

SWITCHES:
/P - Pauses the screen when full.
/W - Shows files in a wide format.
/S - Shows or searches for files in the currently logged
directory and subdirectories.
/B - Shows file and directory names only.
/L - Shows names in lowercase.
/C - Displays compression ratio.
/CH - Shows the compression ratio of DBLSPACE files on
the basis of the cluster size of the host drive.
/O:order - Lists the files in a certain order.

You can use more than one SWITCH by using /SWITCH/SWITCH.

ORDERS:
C - Compression ratio, low to high.
D - Chronological order.
G - Group files in subdirectories.
N - File name then extension.
S - File size.

To reverse the order on the above put a
hyphen ( - ) before the order parameter.

/A:attrib - Shows only files with specific attributes.
ATTRIB:
A - Files with archive bit set.
D - Directories only.
R - Read only files.
H - Hidden files.
S - System files.
To reverse the meaning precede the ATTRIB
with a hyphen ( - ).

Wildcards can be used with this command.

TOP


DISKCOMP - Compares the contents of two floppy disks.

Syntax - DISKCOMP DRIVE1: DRIVE2: /SWITCHES
SWITCHES:
/1 - Compares the first side of the disk.
/8 - Compares the first eight sectors of each track.

TOP


DISKCOPY - Copies the contents of one floppy disk to another track by track.

Syntax - DISKCOPY SOURCE: TARGET: /SWITCHES
EXAMPLES:
DISKCOPY A: A: - Would copy the contents of the A: drive to the A: Drive.
Would require you switching disks periodically.
SWITCHES:
/1 - Copies only the first side of disks even if double-sided.
/M - Uses RAM for temporary storage space.
/V - Performs a validity check on the data copied to the target.

If their is no disk source or target specified the current drive will be used for both, but only if you are on a floppy drive. If the target disk is not formatted it will be.
.

TOP


DOSKEY - Recalls an X amount of the last commands used by pressing the up arrow.

Syntax - DOSKEY MACRO=COMMANDS[/OPTIONS]
SWITCHES:
/INSERT - Changes to insert mode as default.
/OVERSTRIKE - Changes to overstrike mode as default,
used if none specified.
/REINSTALL - Clears buffer and installs an additional
copy of DOSKEY.
/BUFSIZE=NNNN - Specifies size of the command line
buffer NNNN=size in bytes.
/HISTORY - Shows all stored command lines.
/MACROS - Shows all DOSKEY macros.

For more information on DOSKey see COMMAND LINE BUFFER.
.

TOP


EDIT - Loads a full screen ASCII text editor.

Syntax - EDIT DRIVE:\PATH\FILES/SWITCHES
EXAMPLES:
EDIT - Loads the DOS editor without any files, you can then
load a file or start a new one.
EDIT DOS.TXT - Automatically loads the DOS editor with the file DOS.TXT
SWITCHES:
/B - Forces black and white display.
/G - Speeds up display on CGA monitors.
/H - Alters line display for current monitor.
/NOHI - Corrects display on 8 color monitors.

TOP


ERASE - Removes files from hard drives and/or floppy drives.

Syntax - ERASE DRIVE:\PATH\FILE(S) /SWITCHES
EXAMPLE:
ERASE C:\MARIO\*.* /P - Would delete all the files in the MARIO directory and
ask permission before erasing each one.
SWITCHES:
/P - Displays each file one at a time and asks for confirmation before deleting.

Wildcards can be used with this command.

TOP


FASTOPEN - Decreases the amount of time needed to open frequently used files and directories.

Syntax - FASTOPEN DRIVE:=N DRIVE:=n .... /X
N - Specifies the maximum number of file locations
FASTOPEN retains in its filename cache.
/X - Creates the filename in expanded memory.

TOP


FC - Compares two files or sets of files and shows the differences between them.

Syntax - FC /SWITCHES DRIVE1:\PATH1\FILE1 DRIVE2:\PATH2\FILE2
SWITCHES:
/A - Displays only first and last lines for each set
of differences.
/B - Performs a binary comparison.
/C - Disregards the case of letters.
/L - Compares files as ASCII text.
/LBn - Sets the maximum consecutive mismatches to
the specified number of lines.
/N - Displays the line numbers on an ASCII comparison.
/T - Does not expand tabs to spaces.
/W - Compresses white space (tabs and spaces)
for comparison.
/nnnn - Specifies the number of consecutive lines that
must match after a mismatch.

TOP


FIND - Searches for a text "string" in a file or files.

Syntax - FIND /SWITCHES "WHAT YOU ARE LOOKING FOR" DRIVE:\PATH\FILE
SWITCHES:
/V - Shows all lines NOT containing the specified string.
/C - Shows only the count of lines containing the string.
/N - Shows line numbers with the displayed lines.
/I - Ignores the case of characters when searching for the string.

If a pathname is NOT specified, FIND searches the text typed at the prompt or piped from another command.

TOP


FORMAT - Prepares a disk for use by a computer and also erase everything on the disk.

Syntax - FORMAT DRIVES:/SWITCHES
EXAMPLE:
FORMAT A: - This would FORMAT the disk in drive A.
SWITCHES:
/S - Copies system files to make the disk bootable.
/U - Unconditional formatting, can't be unformated.
/V - Prompts for a disk/volume label, does this automatically.
/V:label name - Automatically adds the disk label name when formatting is complete.

Use EXTREME CAUTION when using this command!

TOP