ATTRIB

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]

+ Sets an attribute.

- Clears an attribute.

R Read-only file attribute.

A Archive file attribute.

S System file attribute.

H Hidden file attribute.

/S Processes files in all directories in the specified path.

CD

Displays the name of or changes the current directory.

CHDIR [drive:][path]

CHDIR [..]

CD [drive:][path]

CD[..]

.. Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive.

Type CD without parameters to display the current drive and directory.

CHKDSK

Checks a disk and displays a status report.

CHKDSK [drive:][[path] filename] [/F] [/V]

[drive:][path] Specifies the drive and directory to check.

filename Specifies the file(s) to check for fragmentation.

/F Fixes errors on the disk.

/V Displays the full path and name of every file on the disk.

Type CHKDSK without parameters to check the current disk.

Instead of using CHKDSK, try using SCANDISK. SCANDISK can reliably detect and fix a much wider range of disk problems.

COPY

Copies one or more files to another location.

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination [/A | /B]] [/V] [/Y | /-Y]

source Specifies the file or files to be copied.

/A Indicates an ASCII text file.

/B Indicates a binary file.

destination Specifies the directory and/or filename for the new file(s).

/V Verifies that new files are written correctly.

/Y Suppresses prompting to confirm you want to overwrite an existing destination file.

/-Y Causes prompting to confirm you want to overwrite an existing destination file.

The switch /Y may be preset in the COPYCMD environment variable.

This may be overridden with /-Y on the command line

To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).

DEL

Deletes one or more files.

DEL [drive:][path]filename [/P]

ERASE [drive:][path]filename [/P]

[drive:][path]filename Specifies the file(s) to delete. Specify multiple files by using wildcards.

/P Prompts for confirmation before deleting each file.

DELTREE

Deletes a directory and all the subdirectories and files in it.

To delete one or more files and directories:

DELTREE [/Y] [drive:]path [[drive:]path[...]]

/Y Suppresses prompting to confirm you want to delete the subdirectory.

[drive:]path Specifies the name of the directory you want to delete.

Note: Use DELTREE cautiously. Every file and subdirectory within the specified directory will be deleted.

DIR

Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]

[/O[[:]sortorder]] [/S] [/B] [/L] [/V] [/4]

[drive:][path][filename]

Specifies drive, directory, and/or files to list. (Could be enhanced file specification or multiple filespecs.)

/P Pauses after each screenful of information.

/W Uses wide list format.

/A Displays files with specified attributes.

attributes D Directories R Read-only files

H Hidden files A Files ready for archiving

S System files - Prefix meaning not

/O List by files in sorted order.

sortorder N By name (alphabetic) S By size(smallest first)

E By extension (alphabetic) D By date & time(earliest first)

G Group directories first - Prefix to reverse order

A By Last Access Date (earliest first)

/S Displays files in specified directory and all subdirectories.

/B Uses bare format (no heading information or summary).

/L Uses lowercase.

/V Verbose mode.

/4 Displays year with 4 digits (ignored if /V also given).

Switches may be preset in the DIRCMD environment variable. Override preset switches by prefixing any switch with - (hyphen)--for example, /-W.

DISKCOPY

Copies the contents of one floppy disk to another.

DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]

/1 Copies only the first side of the disk.

/V Verifies that the information is copied correctly.

/M Force multi-pass copy using memory only.

The two floppy disks must be the same type. You may specify the same drive for drive1 and drive2.

DOSKEY

Edits command lines, recalls command lines, and creates macros

DOSKEY [/switch ...] [macroname=[text]]

/BUFSIZE:size Sets size of macro and command buffer(default:512)

/ECHO:on|off Enables/disables echo of macro expansions(default:on)

/FILE:file Specifies file containing a list of macros

/HISTORY Displays all commands stored in memory

/INSERT Inserts new characters into line when typing

/KEYSIZE:size Sets size of keyboard type-ahead buffer(default:15)

/LINE:size Sets maximum size of line edit buffer(default:128)

/MACROS Displays all DOSKey macros

/OVERSTRIKE Overwrites new characters onto line when typing (default)

/REINSTALL Installs a new copy of DOSKey

macroname Specifies a name for a macro you create

text Specifies commands you want to assign to the macro

UP,DOWN arrows recall commands

Esc clears current command

F7 displays command history

Alt+F7 clears command history

[chars]F8 searches for command beginning with [chars]

F9 selects a command by number

Alt+F10 clears macro definitions

The following are special codes you can use in DOSKey macro definitions:

$T Command separator: allows multiple commands in a macro

$1-$9 Batch parameters: equivalent to %1-%9 in batch programs

$* Symbol replaced by everything following macro name on the command line

EDIT

EDIT [/B] [/H] [/R] [/S] [/<nnn>] [/?] [file(s)]

/B - Forces monochrome mode.

/H - Displays the maximum number of lines possible for your hardware.

/R - Load file(s) in read-only mode.

/S - Forces the use of short filenames.

/<nnn> - Load binary file(s), wrapping lines to <nnn> characters wide.

/? - Displays this help screen.

[file] - Specifies initial files(s) to load. Wildcards and multiple filespecs can be given.

EXTRACT

EXTRACT [/Y] [/A] [/D | /E] [/L dir] cabinet [filename ...]

EXTRACT [/Y] source [newname]

EXTRACT [/Y] /C source destination

cabinet - Cabinet file (contains two or more files).

filename - Name of the file to extract from the cabinet.

Wild cards and multiple filenames (separated by blanks) may be used.

source - Compressed file (a cabinet with only one file).

newname - New filename to give the extracted file. If not supplied, the original name is used.

/A Process ALL cabinets. Follows cabinet chain starting in first cabinet mentioned.

/C Copy source file to destination (to copy from DMF disks).

/D Display cabinet directory (use with filename to avoid extract).

/E Extract (use instead of *.* to extract all files).

/L dir Location to place extracted files (default is current directory).

/Y Do not prompt before overwriting an existing file.

FDISK

Configures a hard disk for use with MS-DOS.

FDISK [/STATUS] /X /MBR /PRI /EXT /LOG

/STATUS Displays partition information.

/X Ignores extended disk-access support. Use this switch if you receive disk access or stack overflow messages.

/MBR Reloads the Master Boot Record leaving the partition table intact.

/PRI Allows the creation of a Primary Dos Partition from the command line.

/EXT Allows the creation of an Extended Dos Partition from the command line.

/LOG Allows the creation of a Logical Drive form the command line.

FIND

Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.

/C Displays only the count of lines containing the string.

/N Displays line numbers with the displayed lines.

/I Ignores the case of characters when searching for the string.

"string" Specifies the text string to find.

[drive:][path]filename Specifies a file or files to search.

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

FORMAT

Formats a disk for use with MS-DOS.

FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]

FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]

/V[:label] Specifies the volume label.

/Q Performs a quick format.

/F:size Specifies the size of the floppy disk to format (such as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88).

/B Allocates space on the formatted disk for system files.

/S Copies system files to the formatted disk.

/T:tracks Specifies the number of tracks per disk side.

/N:sectors Specifies the number of sectors per track.

/1 Formats a single side of a floppy disk.

/4 Formats a 5.25-inch 360K floppy disk in a high-density drive.

/8 Formats eight sectors per track.

/C Tests clusters that are currently marked "bad."

MD

Creates a directory.

MKDIR [drive:]path

MD [drive:]path

MEM

Displays the amount of used and free memory in your system.

MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE modulename] [/PAGE]

/CLASSIFY or /C Classifies programs by memory usage. Lists the size of programs, provides a summary of memory in use, and lists largest memory block available.

/DEBUG or /D Displays status of all modules in memory, internal drivers, and other information.

/FREE or /F Displays information about the amount of free memory left in both conventional and upper memory.

/MODULE or /M Displays a detailed listing of a module's memory use. This option must be followed by the name of a module, optionally separated from /M by a colon.

/PAGE or /P Pauses after each screenful of information.

MOVE

Moves files and renames files and directories.

To move one or more files:

MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

To rename a directory:

MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

[drive:][path]filename1 Specifies the location and name of the file or files you want to move.

destination Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it.

[drive:][path]dirname1 Specifies the directory you want to rename.

dirname2 Specifies the new name of the directory.

/Y Suppresses prompting to confirm creation of a directory or overwriting of the destination.

/-Y Causes prompting to confirm creation of a directory or overwriting of the destination.

The switch /Y may be present in the COPYCMD environment variable.

This may be overridden with /-Y on the command line.

MSCDEX

Microsoft CD-ROM Extensions. This extends the file system of a PC to allow it to incorporate CD-ROM drives adding a drive letter.

Usage : MSCDEX [/E/K/S/V] [/D:<driver> ... ] [/L:<letter>]/M:<buffers>]

/E MSCDEX.EXE is to use expanded memory.

/K Allows the use of Kanji (Japanese) script.

/S Allows the CD-ROM drive to be shared in a local network.

/V Displays a summary of RAM allocation and expanded memory usage on the screen when starting up.

/D: This parameter tells MSCDEX.EXE the name of the device driver. It must correspond to the name used during loading of the device specific driver (e.g. OAKCDROM.SYS) in CONFIG.SYS.

/L:<letter> Indicates the drive letter to be used for the CD-ROM drive. Without this parameter, the next available drive letter will be used. Do not assign a letter that is already in use as the computer will not then be able to access the CD-ROM drive.

/M:<size> Indicates the size of the memory buffer to be used. A value of 10 corresponds to 20kB of memory. Values above 32 have no significant effect on the performance of the drive.

REN

Renames a file/directory or files/directories.

RENAME [drive:][path][directoryname1 | filename1] [directoryname2 | filename2]

REN [drive:][path][directoryname1 | filename1] [directoryname2 | filename2]

Note that you cannot specify a new drive or path for your destination.

SORT

Sorts input and writes results to the screen, a file, or another device

SORT [/R] [/+n] [[drive1:][path1]filename1][> [drive2:][path2]filename2][command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]

/R Reverses the sort order; that is, sorts Z to A,then 9 to 0.

/+n Sorts the file according to characters in column n.

[drive1:][path1]filename1 Specifies file(s) to be sorted

[drive2:][path2]filename2 Specifies a file where the sorted input is to be stored.

command Specifies a command whose output is to be sorted.

SYS

Copies MS-DOS system files and command interpreter to a disk you specify.

SYS [drive1:][path] drive2:

[drive1:][path] Specifies the location of the system files.

drive2: Specifies the drive the files are to be copied to.

XCOPY

Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]

[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]

[/K] [/N]

source Specifies the file(s) to copy.

destination Specifies the location and/or name of new files.

/A Copies files with the archive attribute set, doesn't change the attribute.

/M Copies files with the archive attribute set, turns off the archive attribute.

/D:date Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.

/P Prompts you before creating each destination file.

/S Copies directories and subdirectories except empty ones.

/E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.

/W Prompts you to press a key before copying.

/C Continues copying even if errors occur.

/I If destination does not exist and copying more than one file, assumes that destination must be a directory.

/Q Does not display file names while copying.

/F Displays full source and destination file names while copying.

/L Displays files that would be copied.

/H Copies hidden and system files also.

/R Overwrites read-only files.

/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.

/U Updates the files that already exist in destination.

/K Copies attributes. Normal Xcopy will reset read-only attributes.

/Y Overwrites existing files without prompting.

/-Y Prompts you before overwriting existing files.

/N Copy using the generated short names.