Você está na página 1de 14

A MS-DOS command that is not included in command.com.

External commands are commonly external either because they require large requirements and/or are not commonly used commands. Below are examples of MS-DOS external commands currently listed in the Computer Hope database.

The MS-DOS 7 External Commands (Programs in the Windir\COMMAND folder)


Table of Contents (the Programs)
attrib choice command debug deltree diskcopy doskey edit extract fc fdisk find format keyb label mem mode more mscdex nlsfunc qbasic scandisk sort start subst sys xcopy xcopy32

attrib.exe --------

(File) Attributes

Displays or changes file attributes. ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S] + R A S H /S Sets an attribute. Clears an attribute. Read-only file attribute. Archive file attribute. System file attribute. Hidden file attribute. Processes files in all directories in the specified path.

Back to TOC

choice.com --------

(Used in BATCH files)

Waits for the user to choose one of a set of choices. CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices /N /S /T[:]c,nn text

Specifies allowable keys. Default is YN Do not display choices and ? at end of prompt string. Treat choice keys as case sensitive. Default choice to c after nn seconds Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices. Back to TOC

command.com --------

COMMAND.COM

(really an .EXE)

Starts a new copy of the Windows Command Interpreter. COMMAND [[drive:]path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] [/MSG] [/LOW] [/Y [/[C|K] command]] [drive:]path Specifies the directory containing COMMAND.COM. device Specifies the device to use for command input and output. /E:nnnnn Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768). /L:nnnn Specifies internal buffers length (requires /P as well). (nnnn should be between 128 and 1,024). /U:nnn Specifies the input buffer length (requires /P as well). (nnn should be between 128 and 255). /P Makes the new Command Interpreter permanent (can't exit). /MSG Stores all error messages in memory (requires /P as well). /LOW Forces COMMAND to keep its resident data in low memory. /Y Steps through the batch program specified by /C or /K. /C command Executes the specified command and returns. /K command Executes the specified command and continues running. Back to TOC

debug.exe --------

More Info here: DEBUG

Runs Debug, a program testing and editing tool. DEBUG [[drive:][path]filename [testfile-parameters]] [drive:][path]filename testfile-parameters Specifies the file you want to test. Specifies command-line information required by the file you want to test.

After Debug starts, type ? to display a list of debugging commands. Back to TOC

deltree.exe files) --------

Delete Tree (all

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 [drive:]path delete. Suppresses prompting to confirm you want to delete the subdirectory. Specifies the name of the directory you want to

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

diskcopy.com --------

Copy Floppy Disks

Copies the contents of one floppy disk to another. DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M] /1 /V /M Copies only the first side of the disk. Verifies that the information is copied correctly. 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. Back to TOC

doskey.com -------Edits command lines, recalls command lines, and creates macros

DOSKEY [/switch ...] [macroname=[text]] /BUFSIZE:size (default:512) /ECHO:on|off (default:on) /FILE:file /HISTORY /INSERT /KEYSIZE:size (default:15) /LINE:size (default:128) /MACROS /OVERSTRIKE (default) /REINSTALL macroname text UP,DOWN Esc F7 Alt+F7 [chars]F8 F9 Alt+F10 Sets size of macro and command buffer Enables/disables echo of macro expansions Specifies file containing a list of macros Displays all commands stored in memory Inserts new characters into line when typing Sets size of keyboard type-ahead buffer Sets maximum size of line edit buffer Displays all DOSKey macros Overwrites new characters onto line when typing Installs a new copy of DOSKey Specifies a name for a macro you create Specifies commands you want to assign to the macro

arrows recall commands clears current command displays command history clears command history searches for command beginning with [chars] selects a command by number clears macro definitions

The following are special codes you can use in DOSKey macro definitions: $T $1-$9 $* Command separator: allows multiple commands in a macro. Batch parameters: equivalent to %1-%9 in batch programs. Symbol replaced by everything following macro name on the command line.

Back to TOC

edit.com -------MS-DOS Editor Version 2.0.026 EDIT [/B] [/H] [/R] [/S] [/] [/?] [file(s)] /B /H /R - Forces monochrome mode. - Displays the maximum number of lines possible for your hardware. - Load file(s) in read-only mode.

/S / /?

- Forces the use of short filenames. - Load binary file(s), wrapping lines to wide. - Displays this help screen. - Specifies initial files(s) to load. multiple filespecs can be given. characters

[file]

Wildcards and

Back to TOC

extract.exe --------

(Microsoft .CAB files)

Microsoft (R) Diamond Extraction Tool - Version (16) 1.00.0602 (07/14/97) 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 newname /A /C /D /E /L dir /Y Back to TOC - Compressed file (a cabinet with only one file). - New filename to give the extracted file. If not supplied, the original name is used. Process ALL cabinets. Follows cabinet chain starting in first cabinet mentioned. Copy source file to destination (to copy from DMF disks). Display cabinet directory (use with filename to avoid extract). Extract (use instead of *.* to extract all files). Location to place extracted files (default is current directory). Do not prompt before overwriting an existing file.

fc.exe --------

File Compare

Compares two files or sets of files and displays the differences between them.

FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:] [path1]filename1 [drive2:][path2]filename2 FC /B [drive1:][path1]filename1 [drive2:][path2]filename2 /A /B /C /L /LBn /N /T /W /nnnn Displays only first and last lines for each set of differences. Performs a binary comparison. Disregards the case of letters. Compares files as ASCII text. Sets the maximum consecutive mismatches to the specified number of lines. Displays the line numbers on an ASCII comparison. Does not expand tabs to spaces. Compresses white space (tabs and spaces) for comparison. Specifies the number of consecutive lines that must match after a mismatch.

Back to TOC

fdisk.exe -------FDISK [/STATUS] /X /STATUS /X

Partition (Hard) Disks

Configures a hard disk for use with MS-DOS and Windows 95/98/2000.

Displays partition information. Ignores extended disk-access support. Use this switch if you receive disk access or stack overflow messages.

Back to TOC

find.exe --------

Searches for a text string in a file or files. FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]] /V /C /N /I Displays all lines NOT containing the specified string. Displays only the count of lines containing the string. Displays line numbers with the displayed lines. 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. Back to TOC

format.com -------FORMAT FORMAT FORMAT FORMAT drive: drive: drive: drive:

Formats a disk for use with MS-DOS. [/V[:label]] [/Q] [/F:size] [/B | /S] [/C] [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C] [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C] [/Q] [/1] [/4] [/8] [/B | /S] [/C] Specifies the volume label. Performs a quick format. Specifies the size of the floppy disk to format (such as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88). Allocates space on the formatted disk for system files. Copies system files to the formatted disk. Specifies the number of tracks per disk side. Specifies the number of sectors per track. Formats a single side of a floppy disk. Formats a 5.25-inch 360K floppy disk in a high-density drive. Formats eight sectors per track. Tests clusters that are currently marked "bad."

/V[:label] /Q /F:size /B /S /T:tracks /N:sectors /1 /4 /8 /C Back to TOC

keyb.com --------

Configures a keyboard for a specific language. KEYB [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn] xx yyy Specifies a two-letter keyboard code. Specifies the code page for the character set. Specifies the keyboard definition file.

[drive:][path]filename /E /ID:nnn Back to TOC

Specifies that an enhanced keyboard is installed. Specifies the keyboard in use.

label.exe -------LABEL [drive:][label] Back to TOC

Creates, changes, or deletes the volume label of a disk.

mem.exe --------

Memory

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. Displays status of all modules in memory, internal drivers, and other information. Displays information about the amount of free memory left in both conventional and upper memory. 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. Pauses after each screenful of information.

/DEBUG or /D /FREE or /F /MODULE or /M

/PAGE or /P Back to TOC

mode.com -------Printer port: Serial port:

Configures system devices. MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r] MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r] Device Status: MODE [device] [/STATUS] Redirect printing: MODE LPTn[:]=COMm[:] Prepare code page: MODE device CP PREPARE=((yyy[...]) [drive:][path]filename) Select code page: MODE device CP SELECT=yyy Refresh code page: MODE device CP REFRESH

Code page status: Display mode: Typematic rate: Back to TOC

MODE MODE MODE MODE

device CP [/STATUS] [display-adapter][,n] CON[:] [COLS=c] [LINES=n] CON[:] [RATE=r DELAY=d]

more.com -------Displays output one screen at a time. MORE [drive:][path]filename MORE < [drive:][path]filename command-name | MORE [drive:][path][filename] [drive:][path]filename command-name Specifies file(s) to display one screen at a time. Specifies a command whose output will be displayed.

Back to TOC

mscdex.exe --------

CD-ROM Program

Allows MS-DOS to communicate with CD-ROM drives. (Note: A 'driver' program for the specific type of CD-ROM drive must be installed first -- usually listed in the machine's CONFIG.SYS file.) Usage: MSCDEX [/E/K/S/V] [/D: ... ] [/L:] [/M:] Back to TOC

nlsfunc.exe --------

Loads country-specific information. NLSFUNC [[drive:][path]filename] [drive:][path]filename Specifies the file containing country-specific information.

Back to TOC

qbasic.exe Interpreter --------

Quick-Basic

Starts the MS-DOS QBasic programming environment. QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN] [drive:][path]filename] /B /EDITOR /G /H /MBF /NOHI support. /RUN Allows use of a monochrome monitor with a color graphics card. Starts the MS-DOS Editor. Provides the fastest update of a CGA screen. Displays the maximum number of lines possible for your hardware. Converts the built-in functions MKS$, MKD$, CVS, and CVD to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively. Allows the use of a monitor without high-intensity Runs the specified Basic program before displaying it.

[[drive:][path]filename] Specifies the program file to load or run. Back to TOC

scandisk.exe --------

SCANDISK [drive:] [/a] [/n] [/p] drive: to specify the drive(s) you want to check. /a /n /p to check all your local, nonremovable hard disks. to start and close ScanDisk automatically. to prevent ScanDisk from correcting any errors it finds.

Examples: ======== To check drive D and start and close ScanDisk automatically, the following command might be used:

c:\windows\scandisk.exe d: /n To check all nonremovable hard disks but prevent ScanDisk from correcting any errors it finds, this command could be used: c:\windows\scandisk.exe /a /p [NOTE: Scandskw.exe is the WINDOWS 9x/Me version of the DOS7 ScanDisk.] Back to TOC

sort.exe --------

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 /+n [drive1:][path1]filename1 [drive2:][path2]filename2 command Reverses the sort order; that is, sorts Z to A, then 9 to 0. Sorts the file according to characters in column n. Specifies file(s) to be sorted. Specifies a file where the sorted input is to be stored. Specifies a command whose output is to be sorted.

Back to TOC

start.exe Program) -------START [options] program [arg...] START [options] document.ext

Start (Windows

Runs a Windows program or an MS-DOS program.

/m[inimized] Run the new program minimized (in the background). /max[imized] Run the new program maximized (in the foreground). /r[estored] Run the new program restored (in the foreground). [This is the default.]

/w[ait] Back to TOC

Does not return until the other program exits.

subst.exe --------

Substitute

Associates a path with a drive letter. SUBST [drive1: [drive2:]path] SUBST drive1: /D drive1: [drive2:]path /D Specifies a virtual drive to which you want to assign a path. Specifies a physical drive and path you want to assign to a virtual drive. Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives. Back to TOC

sys.com -------SYS [drive1:][path] drive2:

(Copy) System Files

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

[drive1:][path] Specifies the location of the system files. drive2: Specifies the drive the files are to be copied to. Back to TOC

xcopy.exe --------

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 /A /M /D:date /P /S /E /W /C /I /Q /F /L /H /R /T

Specifies the location and/or name of new files. Copies files with the archive attribute set, doesn't change the attribute. Copies files with the archive attribute set, turns off the archive attribute. 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. Prompts you before creating each destination file. Copies directories and subdirectories except empty ones. Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. Prompts you to press a key before copying. Continues copying even if errors occur. If destination does not exist and copying more than one file, assumes that destination must be a directory. Does not display file names while copying. Displays full source and destination file names while copying. Displays files that would be copied. Copies hidden and system files also. Overwrites read-only files. Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. (/T /E includes empty directories and subdirectories.) Updates the files that already exist in destination. Copies attributes. Normal Xcopy will reset read-only attributes. Overwrites existing files without prompting. Prompts you before overwriting existing files. Copy using the generated short names.

/U /K /Y /-Y /N Back to TOC

xcopy32.exe -------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 destination /A /M /D:date Specifies the file(s) to copy. Specifies the location and/or name of new files. Copies files with the archive attribute set, doesn't change the attribute. Copies files with the archive attribute set, turns off the archive attribute. Copies files changed on or after the specified date. If no date is given, copies only those files whose

/P /S /E /W /C /I /Q /F /L /H /R /T

source time is newer than the destination time. Prompts you before creating each destination file. Copies directories and subdirectories except empty ones. Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. Prompts you to press a key before copying. Continues copying even if errors occur. If destination does not exist and copying more than one file, assumes that destination must be a directory. Does not display file names while copying. Displays full source and destination file names while copying. Displays files that would be copied. Copies hidden and system files also. Overwrites read-only files. Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. ( /T /E includes empty directories and subdirectories.) Updates the files that already exist in destination. Copies attributes. Normal Xcopy will reset read-only attributes. Overwrites existing files without prompting. Prompts you before overwriting existing files. Copy using the generated short names.

/U /K /Y /-Y /N

Você também pode gostar