This action might not be possible to undo. Are you sure you want to continue?
APPEND (External) APPEND ; APPEND [d:]path[;][d:]path[...] APPEND [/X:on|off][/path:on|off] [/E] Displays or sets the search path for data files. DOS will search the specified path(s) if the file is not found in the current path. APPEND Type: External (3.3 and later) Syntax: APPEND APPEND ; APPEND [d:]path[;][d:]path[...] APPEND [/X:on|off][/path:on|off][/E] Purpose: Sets the path to be searched for data files or displays the current search path.
The APPEND command is new to DOS with Versions 3.3 and later. It gives you a way to set the search path for data files. The APPEND command is similar to the PATH command that tells DOS where to search for program files (files with a .COM, .EXE, or .BAT filename extension). The APPEND command guides the search for data files (such as text files). NOTE: If a file with a .COM, .EXE, or .BAT filename extension is to be treated as a data file (for example, if you want to edit the contents of a batch file), its path CAN be specified using the APPEND command. However, if you want to execute the file from any directory, you must specify its location using the PATH command.
Use the APPEND command without options to display the current search path. Using APPEND followed only by a space and a semicolon (APPEND ;) deletes previously appended search paths. DOS will then search for data files only on the current drive and directory. Use the APPEND command to tell DOS where to search for data files if a specified file is not found in the current directory. This means that you will need only one copy of a file on your fixed disk, even if you use it for different purposes. For example, you can store a copy of the file NAMES1.TXT in the directory LISTS and use it (copy from it, insert it into other files) while working in any drive or directory. Invalid drive designations will not be detected until DOS attempts to use the search path to find a specified file. Once APPEND has been loaded into memory, you can re-enter the APPEND command to change the specifications from any drive or directory. The APPEND command CAN be used on a network. NOTE: If you have used APPEND with the /X option and you plan to use the BACKUP and RESTORE commands, you must first cancel the option by entering append; If you plan to use the ASSIGN command to redirect drive requests, use the APPEND command first (refer to the ASSIGN command section for more information). CAUTION: The APPEND command should not be used with Microsoft Windows or the Windows Setup program.
/X: [on | off] - The /X switch is used by DOS to guide the search path for programs (such as DOS commands). Set the /X switch before specifying paths to search. The /X switch can only be specified the first time you use the APPEND command. In versions after
DOS Version 4 this parameter can be specified as either /X:on (to search appended directories when executing programs) or /X:off (to not search appended directories when executing programs). The default value is /X:off. /Path:[on|off] - In DOS versions after DOS Version 4 the /Path: on|off option is used tell DOS whether to search the appended path for a data file when a path has been included with the name of the file the program is looking for. /path:off is the default. /E - Use the command with the /E switch to store the names of the APPENDed directories in the DOS environment (refer to the SET command for more information about the DOS environment). The /E switch can only be specified the first time you use the APPEND command.
If you want DOS to automatically search for files stored on drive C in either the MEMOS subdirectory or the LETTERS subdirectory, enter append c:\memos;c:\letters DOS will first search for any data files you specify in the currently active drive and directory. If the files are not found there, it will search the path \MEMOS, and finally the path \LETTERS. For example, if you want to use the TYPE command to display the contents of the file LET3-9.TXT that is in the \LETTERS directory, you can enter type let3-9.txt DOS will first search for the file in the current directory, but if it is not found there, DOS will immediately search the \MEMOS and \LETTERS directories on drive B. If the file is found there, the TYPE command will immediately display its contents. If you want DOS to search additional directories, you must enter the entire command again, listing all the directories you want to search. Each path designation must be separated by a semicolon. For example, if you want DOS to continue to search the \MEMOS and \LETTERS directories, but want to first search for specified data files on drive B, re-enter the command like this: append b:;c:\memos;c:\letters
or PRINT COMMANDS with redirected drives.. This command is especially useful when you are using a program that automatically attempts to read or write to a specified drive.] /sta Purpose: Redirects disk drive requests to a different drive. Example . By reassigning that drive letter. enter ASSIGN without any options. JOIN.) Discussion Use the ASSIGN command to change drive assignments from the drive indicated by the first letter you enter (x). this program is stored on the DOS supplemental disk. RESTORE. This command should not be used with other DOS commands that need to get drive information.. don`t use the BACKUP. The equal sign is optional. DISKCOPY and DISKCOMP will ignore any drive reassignments. When you want DOS to again carry out drive requests as usual. Also.0 and later) Syntax: ASSIGN ASSIGN x=y [. you tell DOS to ignore requests to the first drive letter and instead carry out both reads and writes on the second drive letter.. ASSIGN Type: External (2. Do not enter a colon after the drive letters. In DOS Version 5 you can use the /sta (status) parameter to display a report of the currently assigned drives.ASSIGN (External) ASSIGN x=y [. LABEL. Entering the command without any parameters causes all drive reassignments to be reset to normal. SUBST. You can use this command with application programs that attempt to act on drives you don`t want to use (or don`t have installed in your computer). The FORMAT. (In DOS Version 6.] /sta Redirects disk drive requests to a different drive.. to the drive indicated by the second letter (y) entered.
After this form of the command is entered. For example.assign a=b DOS sends any requests for drive A to drive B. enter assign a=b c=b Requests for either drive A or drive C would automatically be sent to drive B. if you enter dir a: DOS will display a directory of the files on drive B (not of drive A). For example. the command dir a: will result in a display of the files on drive B instead of drive A. You can reassign more than one drive at a time (leave a space between entries). Enter assign /sta and a report of the assigned drives will be displayed in the following format: Original A: set to D: Original B: set to D: .
Discussion Using the ATTRIB command. but not written to (for example. DOS will display the words ACCESS DENIED. and hidden attributes of a file or directory. system. the file can be accessed. you CANNOT use a directory name instead of a filename to change the attributes of all files in a directory. archive. If a file has an attribute of -R.ATTRIB (External) ATTRIB [d:][path]filename [/S] ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [d:][path]filename [/S] Sets or displays the read-only. you can change a file`s read/write attribute or set the archive attribute.0 and later) Syntax: ATTRIB [d:][path]filename [/S] ATTRIB [+ R|-R] [+A|-A] [+ H|-H] [+ S|-S] [d:][path]filename [/S] Purpose: Sets or displays the read-only. it can be both read from or written to (it is referred to as read/write). You can use the +A or -A options to selectively back up using the BACKUP command. You can also use these options to selectively copy using the XCOPY command. but not altered or deleted. However. system. If a file has an attribute of +R. ATTRIB Type: External (3. RESTORE. . it can be read from. The BACKUP. you can use your word processor to look at it but not to alter it). Before you can erase the file you must use the ATTRIB command to change the file`s attribute to read/write (-R). NOTE: If you try to erase a file after you have set its attribute to read-only (+R). Wildcard characters (? and *) can be used. and hidden attributes of a file or directory. and XCOPY commands can use the archive attribute. If you use this command to specify a file as read-only. archive.
TXT: attrib +r a:sales87. The file will not appear in a directory listing.With DOS Versions 4 through 6. -A . use the +H option to set the HIDDEN attribute of a file so that it will not appear in a directory listing. +H . it will not appear in a directory listing unless you specifically request it with the /A parameter of the DIRECTORY command. this flags the file as a command file used only by DOS.Use the /S switch to set attributes on subdirectories found within the specified path. +A . The +S (system) and -S options are generally used by programmers to hide and unhide command files used only by DOS.doc . When the +S option is used. -H . -S . When the +A option is used.TXT. This attribute is generally reserved for programmers. this flags the file as available for archiving when using the BACKUP or XCOPY commands.With DOS Versions after Version 4. -H removes the hidden attribute. Examples The following form of the command sets the read-only attribute for the file SALES87.Use the -A option to turn off the ARCHIVE attribute. Read-only files may be read but they can`t be changed or deleted. Options +R . -R . To set the archive attribute for the file LETTER3. +S .Use the +R option to make a file read-only.txt After you have set the read-only attribute for the file SALES87. or deleted).With DOS Version 5 and later you can hide data files by applying the +H (hidden) attribute. enter attrib +a b:\letters\letter3. /S .Use the -S option to turn off the SYSTEM attribute.DOC which is in the \LETTERS directory on drive B. After applying the hidden or system attribute to a file. DOS will not allow you to delete or modify it (until the attribute is removed).Use the +A option to set the ARCHIVE attribute of a file.Use the -H option to turn off the HIDDEN attribute. use the +S option to set the SYSTEM attribute of a file.Use the -R option to change the file protection attribute back to normal (so it can be read. changed.
refer to the BACKUP and XCOPY command sections.* The attribute settings for all of the files on the current directory will be displayed. The second file is also marked as read-only. To determine the current attribute settings for all of the files in the current directory. commands such as XCOPY can selectively act on them (using the BACKUP or XCOPY /M switch). you were working in the \LETTERS directory on the diskette in drive B. enter attrib *. For more information.DOC B:\LETTERS\SALES-N.After the archive bit has been set. ATTRIB would display something like this: A A R B:\LETTERS\LETTER3. If.TXT B:\LETTERS\SALES87.TXT This display indicates that three files were found and that the first two had the archive bit set. . for example.
) BACKUP Type: External (2. the ERRORLEVEL exit code is set as follows: 1. files are backed up from the current directory. No files could be found to back up. Terminated due to any other type of error. 2.) Discussion The first path and filename(s) you enter identify the disk file(s) to be backed up. You can use the wild card characters (* and ?) to specify groups of files to be backed up. You must use the RESTORE .BACKUP (External) BACKUP d:[path][filename] d:[/S][/M][/A][/F:(size)] [/P][/D:date] [/T:time] [/L: [path]filename] Makes a backup copy of one or more files. Terminated when you pressed the Ctrl + Break key combination. 4. this program is stored on the DOS supplemental disk. The second drive specified is the drive where the backup copy will be sent. If you do not specify the first path. then all files in the directory are backed up. (In DOS Version 6. this program is stored on the DOS supplemental disk. 3. Files backed up using the BACKUP command are stored in a special. If errors are encountered during the BACKUP process.0 and later) Syntax: BACKUP [d:][path][filename] [d:][/S][/M][/A][/F:(size] [/P][/D:date] [/T:time] [/L:[d:] [path]filename] Purpose: Makes a backup copy of one or more files. (In DOS Version 6. Some files were not backed up due to file conflicts. If you do not specify a filename or extension. compacted format and are therefore not usable for normal file processing. These codes can be used with the batch processing IF command to write backup batch files that test for errors during the backup process.
The number of the backup disk that contains the file.command to recall them and store them in the normal (un-compacted) format.0 stored backed up files in a different format than earlier versions (the new backup method requires less disk space). the current entry is added to the existing file.2. The BACKUP file will contain all the files that were backed up and the CONTROL file will contain file storage information such as the paths and filenames of the source files. you will be prompted to insert a new diskette.2M drive. 2. Use of this option cancels the prompt to insert a diskette in the target drive before the copying starts. 360. If the backup log file you specify already exists.Formats the target disk (if it is not already formatted). The date and time that the files were backed up. 1. Options /A . . This option uses the FORMAT program which must. For example.88. NOTE: DOS Versions 3. 320. the system creates the file BACKUP. If you use this option but do not specify a backup log file. In DOS Versions 4 and 5. In these versions.Does not erase the files on the target disk (DOS normally will erase existing files on the target diskette before it starts backing up the files). The information stored in this file can be used when you want to restore a particular file from a backup disk. therefore. 180. 1. /F:(size) . or (in DOS Version 5) 2.44. if you are using a 360K diskette in a 1.2 or earlier. (size) can be 160. /L . you can use F:(size) if the capacity of the target diskette does not match that of the drive in which you put it.LOG in the root directory of the source drive. the BACKUP program creates two files on the backup disk: BACKUP and CONTROL. 720. The name of the file that was backed up. be accessible via the current path. but after the target disk is filled with backed-up files. NOTE: The /A option does not work if the files on the backup disk were copied using a BACKUP program in DOS Version of 3.3 through 5. The backup log will contain: 1. 3.Makes an entry in the backup log in the file you specify here.
NOTE: If you are backing up files from a diskette. If the /A option is not used. backup c:\letters\sale*. .Backs up files only if they have been created or modified on or after the time you enter. there will also be a warning that any files currently stored on the target disk will be erased. /D:(date) .Causes files in the specified directory and all subdirectories below the specified directory to be backed up. do not write-protect them. This switch checks the archive attribute of a file. the file will not be backed up. all files in the drive C LETTERS directory that begin with SALE and with any filename extension are backed up onto the disk in drive A.* a: BACKUP will display a prompt when it is time to insert the disks. /S . /P . Example In the following example. /T:(time) . BACKUP changes the archive attribute of each file as it is backed up. If the file`s archive attribute is set to off (-A).Only backs up files that have been modified since the last time the BACKUP command was used. This option will create a directory when that is the only way to pack more files onto the diskette./M .Backs up files only if they have been created or modified on or after the date you enter.Packs as many files as possible onto each diskette.
this will cancel the BREAK options you set.SYS file to set (or display) whether or not DOS checks for a Ctrl + Break key combination. To determine the current BREAK setting. Type: Internal (2. enter break . For more information about the BREAK command. Tips for Advanced Users. see Chapter 6.0 and later) Syntax: BREAK BREAK on|off Purpose: Used from the DOS prompt or in a batch file or in the CONFIG.BREAK (Internal) BREAK =on|off Used from the DOS prompt or in a batch file or in the CONFIG. Examples Enter break on to tell DOS to check for the Ctrl + C key combination. Some application programs automatically reset BREAK (either ON or OFF).SYS file to set (or display) whether or not DOS should check for a Ctrl + Break key combination. Discussion DOS normally detects a press of the Ctrl + Break or Ctrl + C key combination only while checking for keyboard input or while sending characters to the screen. in the downloadable book DOS the Easy Way.
0 and later) Syntax: BUFFERS=(number). the faster DOS will be able to access the information requested. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations.(read-ahead number) Used in the CONFIG. Options number .SYS file to set the number of disk buffers (a number from 1 to 99) that will be available for use during data input.SYS file with the BUFFERS command. .(read-ahead number) Purpose: Used in the CONFIG. If no value is provided the default value (determined by the amount of memory in your computer) will be used. Tips for Advanced Users. DOS stores information in memory buffers so that it will be readily available when requested by an application. in the downloadable book DOS the Easy Way. DOS 5. The more buffers set in the CONFIG. The read ahead buffers determine the amount of data DOS will read from the disk in addition to the data requested by the application. if you have 512K of memory. read ahead . see Chapter 6. the default will be 15.Sets the number of buffers in the secondary or read-ahead cache. Type: Internal (2. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations. You should experiment to determine the most efficient number of buffers for your computer and the applications you are running. In DOS 6.0 you can specify 0 to 8 with 0 as the default. Discussion While conducting input and output operations.0 allows values of 1 to 8 with 1 as the default. The same is true for determining the appropriate number of read-ahead buffers.BUFFERS (Internal) BUFFERS=(number).SYS file to set the number of disk buffers (number) that will be available for use during data input. Generally. For more information about the BUFFERS command.Sets the number of disk buffers DOS should use (1 to 99).
SYS file buffers=20.Example To set buffers to 20 and read-ahead buffers to 2 enter the following line in your CONFIG.2 .
Using Batch Files.BAT. TESTER. see Chapter 5. Type: Internal (3. Discussion Used within a batch file to specify the name of another batch file (a file with the . control is transferred back to the original batch file.CALL (Internal) CALL [d:][path]batchfilename [options] Calls another batch file and then returns to current batch file to continue. For more information on CALL and other batch commands. and FINISH.BAT. in the downloadable book DOS the Easy Way . enter the following three lines in your batch file: call starter call tester call finish . This command function (transfer of control back to a calling batch file) was not available prior to DOS Version 3.BAT in sequence.BAT filename extension). The original batch file calls into action the CALLed batch file.3 and later) Syntax: CALL [d:][path]batchfilename [options ] Purpose: Calls another batch file and then returns to the current batch file to continue processing. When the CALLed batch file ends. Example To run the files STARTER.
After this command sets a new code page. the code page will still be changed. However. The NLSFUNC command must be used prior to using this command. If you change code pages and a device has not been prepared for use with that code page.3 and later) Syntax: CHCP CHCP (codepage) Purpose: Displays or changes the code page that DOS will use. (The code page is a table that defines the character set for a country. DOS will access the COUNTRY command in the CONFIG. Programs run after using this command to change the code page will use the new code page. DOS will display an error message similar to the following: Code page xxx not prepared for system Active code page: xxx Prepared system code pages: xxx xxx The Xs will be replaced by the appropriate number.) Discussion To use this command. Also. device drivers must be prepared in advance (refer to the MODE command). If you select a code page that has not been prepared for your system.CHCP (Internal) CHCP (codepage) Displays the current code page or changes the code page that DOS will use. Changes the code page used by DOS for device-related system operations such as displaying or printing special language characters.SYS file (when the computer is started) to set up special foreign language characters for display or printing. Type: Internal (3. the code page number must have been previously set (refer to Appendix B for more information). DOS will display an error message similar to the following: .
The Xs will be replaced by the appropriate number. the program will display a message similar to the following: Active code page 437 Prepared code pages 437 863 To change the code page setting from 437 to 863.Code page xxx not prepared for device xxx. enter chcp 863 . Examples If you enter CHCP without entering a number.
LETTERS is to be found within the WORDS directory. The path designator can indicate a subdirectory within another directory or subdirectory. Enter CHDIR or CD without a drive and path designation to get a display of the current directory. down to the .. Type: Internal (2.CHDIR (Internal) CHDIR (CD) [d:]path CHDIR (CD)[. The command can be used without the drive designator (d:) if you were changing to a different directory on the current drive. These two directories are to be found within the root directory.. WORDS and FILES have been created on a disk. see Chapter 3. enter cd\words\letters The command indicates the path sequentially down through the directory path: the first backslash indicates the root directory. Using Fixed Disks. assume that two directories. The command followed by two periods (CD. For more information on CHDIR and other hard disk commands. Discussion Used to change from one directory to another you specify.. Examples To demonstrate how the CHDIR command accesses the DOS directory structure. To change to the directory LETTERS (that is within the directory WORDS) on the root directory of drive C.] Purpose: Displays working (current) directory and/or changes to a different directory. Assume also that an additional directory.0 and later) Syntax: CHDIR (CD) [d:]path CHDIR (CD)[. but it must not exceed 63 characters in length. in the downloadable book DOS the Easy Way .] Displays working (current) directory and/or changes to a different directory. down through the directory WORDS.) can be used to change to the parent directory.
If you are already working in the WORDS directory. For example. . you can change to the LETTERS directory without going through the root directory by entering cd letters A shortcut method to change to the directory immediately above the current directory allows you to enter the CHDIR command followed by two periods.. enter cd. the root directory).target directory LETTERS. For example. you can change back to the root directory simply by entering cd\ To change to a directory path other than through the root directory. if you are working in the WORDS directory. Enter it again to change to the next higher directory (in this case. WORDS. do not enter the leading backslash. to change from the LETTERS directory to its parent directory.
you tell CHKDSK to find any of these parts of files or programs that have become separated from the rest of the file. to create a new file for each. Displays error messages (if problems are found) and issues a status report. Discussion Checks for errors on a disk. When you use the /F option. The first file created will be labeled FILE0000. These errors can be accidentally created due to the fact that DOS does not always store files in one continuous block on the disk.CHK extension. If you specify the /F option. If the links between the clusters (blocks of data) are lost. They include: Allocation The size of the space reserved for a file block is incorrect. CHKDSK also looks for and corrects other types of disk errors (refer to Appendix A for more information about CHKDSK errors). By using the /F option. and to write the lost segment to these files. This can result in the DOS error message Allocation error in file If you run CHKDSK using the /F option.CHK. These new files will all start with the letters FILE and will end with four numbers (starting with 0000) plus a . DOS may store the file in two or more pieces in whatever spaces are available on the disk.0 and later) Syntax: CHKDSK [d:][path][filename] [/F][/V] Purpose: Checks a disk and provides a file and memory status report. it will alter the size allocation number.CHKDSK (External) CHKDSK [d:][path][filename] [/F][/V] Checks a disk and provides a file and memory status report. the program will correct non-contiguous errors when it finds them. Type: External (1. If space is limited on the disk (especially if you have previously erased and replaced files). . CHKDSK will discover the error and report it.
The CHKDSK command is discussed in Chapter 1. the pointer information is corrected (truncated to a zero length file). Examples If you enter chkdsk a: CHKDSK will analyze the disk in drive A and report a status message. If CHKDSK finds lost clusters (parts of files or programs that have become separated from the rest of the file) it will write the lost segment to new files and provide the filename FILEnnnn (nnnn will be a number starting with 0000). This can result in the error message First cluster number is invalid. This can result in the error message Entry has a bad attribute If you run CHKDSK using the /F option.Displays progress messages while CHKDSK is in operation. For example. First Cluster Number Invalid DOS`s internal directory of file information on the disk contains a pointer to file storage information that does not match the actual files stored on the disk. It will look something like this: 362496 bytes total disk space 53248 bytes in 2 hidden files 301056 bytes in 8 user files . CHKDSK also reports how many files are stored in non-contiguous blocks (see explanation of non-contiguous blocks above).Attribute There are a number of possible errors having to do with DOS`s internal record of a file`s attributes. a size of linking attribute associated with one or more files does not match the actual file information. Introduction in the downloadable book DOS the Easy Way . entry truncated If you run CHKDSK using the /F option. /V . the program will try to correct the error.If you enter a filename. filename .Corrects errors when it finds them. Options /F .
. the program will also display 3 lost clusters found in 3 chains. they would be reported in a fifth line. This may indicate that the lost segment resulted from file management tasks carried out by your word processor (or other type of program). the number of hidden (system) files stored on the disk. replace the file by re-copying from the original source. The last two lines do not refer to the disk you specified. It may still be operational. check the program file that is stored on disk carefully by running all of its features. they indicate the amount of memory (RAM) in your system and how much of it remains available for use. you should run CHKDSK again.CHK Each of these files will contain a lost cluster. However.8192 bytes available on disk 524288 bytes total memory 198976 bytes free The first four lines of this display refer to the disk you specified: they indicate the total disk space (the storage capacity of the disk). In this case. you may find that the original text file is intact. you can simply delete the newly created segment file. Convert lost chains to files (Y/N)? After this error message is displayed. If (for example) three lost clusters are found. If the lost segment came from a text file you may be able to re-merge it with the main file.CHK FILE0002. this time using the /F option. If you had created directories on the disk. You can use your word processor to look at these files to determine which file the lost segment came from. upon inspection. If possible.CHK FILE0001. Enter the command as chkdsk a: /f Three new files would be created on the root directory of the disk with the following filenames: FILE0000. you probably will not be able to re-merge it. the number of user files stored on the disk. If the lost segment came from a program file. and the amount of storage space still remaining to be used. If you cannot replace the file.
CHOICE (Internal) CHOICE [/C[:]keys] [/N][/S][/T[:]c,nn] [text] Used to provide a prompt so that a user can make a choice while a batch program is running. Type: External (6.0 and later) Syntax: CHOICE [/C[:]keys] [/N][/S][/T[:]c,nn] [text] Purpose: Used to provide a prompt so that a user can make a choice while a batch program is running (new with DOS Version 6).
This command is used only in batch programs. It is used to display a prompt to the user. The specified prompt is displayed and the program pauses while the user makes a choice from a specified set of keys. For more information on CHOICE and other batch commands, see Chapter 5, Using Batch Files, in the downloadable book DOS the Easy Way
text - Used to specify text to be displayed before the prompt. When text has not been specified, CHOICE will display only the prompt. You must use quote marks around the text if you include a switch character (/) as part of the text. /C[:]keys - Used to specify the keys that the user can select from when the prompt is displayed. When displayed, the list of key choices will be separated by commas and enclosed in brackets with a question mark at the end. If the /C option is not used, the CHOICE command displays the default key choices of Y and N. The colon [:] is optional. /N - When the /N option is used the prompt will not be displayed, however the text before the prompt will be displayed and the specified keys will still be valid. /S - Using the /S option causes CHOICE to be case sensitive to the keys entered by the user at the prompt. /T[:]c,nn - The /T option can be used to limit the number of seconds the batch program will pause before it defaults to a specified key. The values for the /T switch are:
c - Specifies the default key (character). The key must be one of those specified in the /C switch. nn - Specifies the length of the pause in seconds (0 to 99).
If you were writing a batch program and wanted to use the CHOICE command to prompt the user to select from the keys Y, N, and C, you would enter the following: choice /c:ync The user would see the following prompt: [Y,N,C]? To make it more obvious to the user exactly what they are selecting, you could add some explanatory text to the prompt by entering, choice /c:ync Yes, No, or Continue The user would then see, Yes, No, or Continue [Y,N,C]? If you wanted to use the /T option to limit the amount of time a user has to make a choice at the prompt you might enter, choice /c:ync /t:c,10 The user would still see the prompt [Y,N,C]? from which they could make their choice. If a selection was not made within 10 seconds the C option would be assumed and the batch program would continue.
CLS (Clear Screen) (Internal) CLS Clears (erases) the screen. Type: Internal (2.0 and later) Syntax: CLS Purpose: Clears (erases) the screen.
Erases all characters and graphics from the screen; however, it does not change the currently-set screen attributes.
Enter cls to clear the screen of everything but the command prompt and the cursor.
Options device .768 bytes. Type: External (2. program.COMMAND (External) COMMAND [d:][path] [device] [/P][/E:(size)] [/MSG][/Y [/C (command)|/K (command)] Starts a new version of the DOS command processor (the program that loads the DOS Internal programs). Starting a new command processor also creates a new command environment (SET commands are canceled). or batch program and then .Specifies the environment size. The default value is 256 bytes. If that happens.COM program.0 and later) Syntax: COMMAND COMMAND [d:][path] [device] [/P][/E:(size)] [/MSG] [/Y [/C (command)| /K (command)] Purpose: Reloads the DOS command processor (the program that loads the DOS internal programs) or starts a new command processor. /C (string) . If COMMAND. DOS will discover that the memory-resident portion is missing and it will attempt to go to the disk to reload the transient portion from the COMMAND.Runs the specified command.COM cannot be found. The command processor is loaded in two parts: the transient component and the memoryresident component. The size can be from 160 to 32. The memory-resident part resides in a portion of memory that can occasionally be overwritten by application programs. Discussion Using this command with no options loads a new command processor with the DOS internal programs. /K (command) .Performs the command indicated by the string and then returns to the original command processor. DOS will terminate operations until the COMMAND program can reload. /E:(size) .Specifies a new input/output device at the time the new command processor is loaded.
COM to step through the batch file that has been specified with the /C or /K options . and then exit back to the original command processor. You could use COMMAND. /Y .SYS file.Stores all error messages in memory.Keeps the secondary command processor in memory from that point in time forward.Tells COMMAND.SYS file in the following way: SHELL=[[dos-drive:]dos-path]COMMAND. /MSG . This option must be the last one on the COMMAND command line (new with DOS Version 6).COM in your CONFIG. This option should be used only when COMMAND is used with the SHELL command in the CONFIG. Example If you enter command /c dir DOS will load the secondary command processor. /P .COM[[d:]path][device] [/E:(size)] [/P [/MSG]] . This option is useful for debugging batch files (new with DOS Version 6).displays the DOS command prompt. The only way to reload the original command processor is by restarting the system. If you use the /MSG option you must also use the /P option. execute the DIR command to show the files on the current drive and directory. The EXIT command cannot be used to stop the command processor. Useful only if you are running DOS from floppy disks.
If a specified file does not contain such a mark. The COMP program also checks to make sure the file sizes indicated in the directory are the same for compared files. you should make sure the diskette(s) containing the files to be compared are already in the specified drives. Wildcard characters (? and *) can be used to specify groups of files to be compared (files of the same names will be compared).of-file marker by pressing and holding the Ctrl key and then pressing the letter Z key. a comparison is not carried out if the files are stored as different sizes. If you enter one or more pathnames or filenames after the command name.) Discussion Compares two files or two groups of files. when you press the Enter key the comparison will begin immediately. enter the command name . the following error message will be displayed: EOF mark not found This mark is created by your word processor or other application program to indicate the end of the file. The files can have the same names. (In DOS Version 6. the program checks to see if files contain a valid end-offile mark. one set at a time. You can create the end. Before starting the comparison. If you want to change diskettes after entering the command. (See FC command).COMP (External) COMP [d:][path][filename] [d:][path][filename] [/A][/C][/D][/L][/N:(number)] Compares two groups of files to find information that does not match. this program is stored on the DOS supplemental disk. COMP will not compare files that do not contain an end-of-file marker. Type: External Syntax: COMP [d:][path][filename] [d:][path][filename] [/A][/C][/D][/L][/N:(number)] Purpose: Compares two groups of files to find information that does not match. therefore. Each set of specified files will be compared. or different names.
If the files are identical. Next. . After ten mismatches. First. /N:(number) .with no following parameters. it will report: Files compare OK If the files are not identical. (The default format is hexadecimal. COMP will display Compare more files (Y/N)? To enter more files to compare. COMP will display the memory locations of any portions of the compared files that do not match. rather than the byte offset.) /L . If you enter the COMP command with no options . press the letter N key. the program will display: Enter 2nd filename or drive ID After you enter the second filename(s).Displays the number of the line where the difference occurred. press the letter Y key. the program terminates the comparison.Displays the differences found between compared files in decimal format.Displays the differences found between compared files as characters. the program will prompt you for the file and/or path designations. it will report on the differences it finds. the program will display: Enter primary filename Enter the name of the first file or group of files.ending compare After all pairs specified have been compared. the program will compare the files. Options /A . issuing reports on its progress. The following message is displayed 10 Mismatches .Performs a comparison that is not case-sensitive. /D . /C . To terminate the comparisons.Allows you to enter the number of lines in both files that will be compared.
For more information about this command. enter comp a:\letters b:\letters .even if the files are of different sizes.txt b: To compare all of the files in the LETTERS directory on drive A with all of the files in the LETTERS directory on drive B. Examples To compare all the files ending in . refer to the downloadable book DOS the Easy Way. enter comp a:*.TXT on drive B.TXT on drive A with all of the files ending in .
. By copying from the keyboard console (COPY CON:) to the screen.0 and later) Syntax: COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:][path][filename] [/V] or COPY [/Y|-Y] [/A][/B] [d:][path]filename+[d:][path]filename[. files can be created and then saved to disk. Files can be copied with the same name or with a new name. COPY can also be used to create new files. If errors are encountered during the copying process. However. copied files are stored in the same format they are found in. The second filename you enter is referred to as the target file. The copied files can be used just as you would use the original (whether the copied file is a data file or a program). Discussion COPY is usually used to copy one or more files from one location to another.][d:][path][filename] [/V] Copies and appends files. COPY can also be used to transfer data between any of the system devices. If you attempt to copy a file to the same directory without providing . the file will be copied with the same name. Files may also be combined during the copy process. Type: Internal (1. Unlike the BACKUP command. NOTE: Files can be copied to the same directory only if they are copied with a new name. If you copy a file to a different directory without specifying a new name.... the COPY program will display error messages using these names.COPY (Internal) COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:][path][filename] [/V] or COPY [/Y|-Y][/A][/B] [d:][path]filename+[d:][path]filename[.] [d:][path][filename] [/V] Purpose: Copies or appends files. The first filename you enter is referred to as the source file.
TEST2. Introduction. By default.Causes COPY to replace existing files without providing a confirmation prompt.DOC to a new file.DOC to the current directory with the new name. If an end-of-file mark is encountered in the file. COPY will provide a confirmation prompt. /A . /V .Checks after the copy to assure that a file was copied correctly. Copied files will be read by size (according to the number of bytes indicated in the file`s directory listing). DOS will cancel the copy and display the message File cannot be copied onto itself The COPY command was also discussed in Chapter 1.Displays a confirmation prompt before copying over existing files. existing files were simply overwritten. To copy all files with a .DOC filename extension on drive C to a new file ALLDOCS on drive B. if you specify an existing file as the destination file.DOC from the current directory to drive B (with the same name). To copy the file TEST. the second file is the target file. the program will display an error message. DOS will append an end-of-file mark at the end of the copied file. If the copy cannot be verified. Options /Y .) /-Y . enter copy test. TEST3. An end-of-file mark is not placed at the end of the copied file.doc+test2. Files will be copied until an end-of-file mark is encountered in the file being copied. the rest of the file is not copied. Applies to the filename preceding it and to all following filenames. in the downloadable book DOS the Easy Way.a new name. Using this option will result in a slower copying process.DOC and TEST2. Applies to the filename preceding it and to all following filenames. enter . enter copy test.doc b: To copy the file TEST.doc b:test3 You can also combine files by using wildcard characters (? and *). /B .Used to copy binary files. Examples The first filename you enter is the source file. (In previous versions of DOS. enter copy test1.doc test2 To copy and combine (concatenate) the files TEST1.Used to copy ASCII files.
more complicated.doc b:alldocs Other.doc b:*.TXT filename extension with all files that have the same filename and a .ADD. enter copy *. combinations are also possible while copying.add In this case.ADD extension. . copying the newly combined file to a new file on drive B with an .copy c:*. to combine all files with a . For example.DOC resulting in a combined file with the filename TEST.TXT will be combined with the file TEST. the file TEST.DOC extension.txt+*.
The filename indicates a file that contains country-specific information (the default file name is COUNTRY.sys . Discussion The COUNTRY command affects the following items: date and time formats.SYS file to tell DOS to use country-specific text conventions during processing.A three-digit number used to specify the country code you want to use. the thousands and decimal characters used in numbers.SYS file located in the DOS directory on drive C. An application program must be written to support the international features of DOS.][d:][filename] Used in the CONFIG.Specifies the character set to be used for the specified country. enter country=001. Options countrycode . The default code page for the specified country will be used if no codepage is entered. otherwise the settings specified with the COUNTRY command will be ignored (refer to Appendix B for country-specific information). the location and symbol used for currency. Type: Internal (3.[code page][. The countrycode numbers are generally based on the international long-distance telephone codes. The default value is 001 for the United States.][d:][filename] Purpose: Used in the CONFIG. codepage .SYS).c:\dos\country. and alphabetical sorting order.0 and later) Syntax: COUNTRY=country code.COUNTRY (Internal) COUNTRY=country code. Example To set the country to the United States using the default codepage using the COUNTRY. upper-to lowercase conversions.[code page][.SYS file to tell DOS to use country-specific text conventions during processing..
If. for example. It cannot be used for peripheral devices such as a printer. DOS will attempt to read from the device.CTTY (Internal) CTTY (device) Changes the standard I/O (Input/Output) device to an auxiliary device. Discussion The CTTY command is used only for I/O (input/output) devices such as a monitor. enter ctty aux To change back to the standard I/O device enter ctty con . Type: Internal (2. producing an error condition. Valid device names are: AUX LPT CLOCK$ LST COM NUL CON PRN Example To change to another I/O device using the AUX port.0 and later) Syntax: CTTY (device) Purpose: Changes the standard I/O (Input/Output) device to an auxiliary device. However. BASIC and other programs that do not access I/O devices with DOS calls will not recognize device changes reset using this command. Affects only programs that use standard DOS calls. you specify a printer. DOS does not check to make sure you have entered a valid device name.
You can also enter the date at the same time you enter the date command. one or two numbers to .DATE (Internal) DATE mm-dd-yy Displays and/or sets the system date. This date will be shown when you use the DIR command to display information about files.0 and later) Syntax: DATE DATE mm-dd-yy Purpose: Displays current date setting and provides a way to reset the date. Type: Internal (1. or type in the date using the format shown. Example When you enter date if the current date is set the program will display Current date is Sat 06-11-1994 Enter new date (mm-dd-yy): Press Enter to leave the date as it is. Be sure to enter one or two numbers to indicate the month. For information on using the PROMPT command to display the date. Tips for Advanced Users. Discussion You can enter the DATE command alone and the program will prompt you when to enter the date. you must enter the date in the following format: The date you set will be used by DOS to ³date stamp² files that are created or modified. then a hyphen. Either way. You can specify the numbers to set the date at the same time you enter the DATE command or you can enter the command alone and the program will prompt you to enter the date. refer to Chapter 6.
another hyphen. to set the date on May 24. For example. enter 5-24-94 .indicate the day of the month. 1994. and one or two numbers to i ndicate the year.
DBLSPACE (External) DBLSPACE / automount=drives DBLSPACE /chkdsk [/F] [d:] DBLSPACE /compress d: [/newdrive=host:] [/reserve=size] [/F] DBLSPACE /create d: [/newdrive=host:] [/reserve=size] [/size=size] DBLSPACE /defragment [d:] ]/F] DBLSPACE /delete d: DBLSPACE /doubleguard=0|1 DBLSPACE /format d: DBLSPACE [/info] [d:] DBLSPACE /list DBLSPACE /mount[=nnn] host: [/newdrive=d:] DBLSPACE /ratio[=ratio] [d:] [/all] DBLSPACE /size[=size] [/reserve=size] d: DBLSPACE /uncompress d: DBLSPACE /unmount [d:] A program available with DOS 6.0 that allows you to compress information on a disk. Type: External (6. beginning .0 and later) Syntax: DBLSPACE DBLSPACE / automount=drives DBLSPACE /chkdsk [/F] [d:] DBLSPACE /compress d: [/newdrive=host:] [/reserve=size] [/F] DBLSPACE /create d: [/newdrive=host:] [/reserve=size] [/size=size] DBLSPACE /defragment [d:] ]/F] DBLSPACE /delete d: DBLSPACE /doubleguard=0|1 DBLSPACE /format d: DBLSPACE [/info] [d:] DBLSPACE /list DBLSPACE /mount[=nnn] host: [/newdrive=d:] DBLSPACE /ratio[=ratio] [d:] [/all] DBLSPACE /size[=size] [/reserve=size] d: DBLSPACE /uncompress d: DBLSPACE /unmount [d:] Purpose: DBLSPACE is a disk compression utility that is included with DOS.
You should use the SCANDISK utility instead.with Version 6.Specifies the removable drives that you want DBLSPACE to automatically mount. It provides a way to increase disk capacity by compressing the data on all or part of a disk. Some versions of DOS may include other methods of compressing stored data. The default is for automatic mounting of removable drives. DBLSPACE / CHKDSK Syntax: DBLSPACE /chkdsk [/F] [d:] Tells DBLSPACE to check the structure of a compressed drive and report any errors found. DBLSPACE / AUTOMOUNT Syntax: DBLSPACE / automount=drive Enables or disables automatic mounting of removable drives. You cannot use this command while Windows is running.2. it has also been reported that these problems were fixed in the 6.) . Discussion To start the full-screen interface of the DBLSPACE disk-compression program you enter dblspace by itself on the command line. Option 1. In addition. The sections that follow describe each of the DBLSPACE options that are available. Using the /F option will cause DBLSPACE to attempt to fix found errors.2 version of DOS. Option 2. you control each individual aspect of the DBLSPACE program by entering options and parameters at the DOS command line. NOTE: Some versions of DOS 6 may not include the DBLSPACE program. especially when DBLSPACE is used in combination with the SMARTDrive program. However. Option drives . it has been reported that the use of the DBLSPACE program that was first included in DOS Version 6 can result in data storage errors. Then. (This option is not available with DOS 6.
0. 1M of uncompressed space will be reserved on your disk.Causes DBLSPACE to return to the DOS command prompt when compression is finished rather than displaying compression statistics. (You can abbreviate newdrive as new.Specifies the amount of space to be left uncompressed on the host drive. Option 4.Specifies the amount of space to be left uncompressed on the host drive. The default is the next available letter. DBLSPACE / COMPRESS Syntax: DBLSPACE /compress d: [/newdrive=host:] [/reserve=size] [/F] Used to compress the files on an existing hard disk. /reserve=size . You cannot use the /SIZE and /RESERVE options at the same time. Options /newdrive=host .The new compressed drive. You cannot use the /SIZE and /RESERVE options at the same time. floppy disk.) /reserve=size . or other removable disk.Option /F .Tells DBLSPACE to repair any errors that it finds. This option can only be used on nonremovable drives. Option 3. the next available drive letter will be used. The default for hard disks is 2M and for floppy disks.Specifies the uncompressed host drive after compression. If you omit both the /reserve and size options . /size=size . If not specified. Options /newdrive=host . /F . DBLSPACE / CREATE Syntax: DBLSPACE /create d: [/newdrive=host:] [/reserve=size] [/size=size] Creates a new compressed drive by using free space on an uncompressed drive. .Specifies the size of the compressed volume file that will be created on the host drive.
.Option 5. leaving the drive intact. Option 6. DBLSPACE / DELETE Syntax: DBLSPACE /delete d: Used to unmount a compressed drive and delete its compressed volume file from the host drive. it is better to use the DBLSPACE/FORMAT option. To delete all the files on a compressed drive. To stop the defragmenting process. Option 7. Restart your computer after using the Doubleguard option.Tells DBLSPACE to defragment the drive more completely. This is accomplished by moving all of the drive`s free space to the end of the drive. DBLSPACE / DEFRAGMENT Syntax: DBLSPACE /defragment [d:] ]/F] Used to defragment a compressed drive. press the Esc key. Option 0|1 0 disables DoubleGuard and 1 enables it. DBLSPACE / FORMAT Syntax: DBLSPACE /format d: Used to delete all files and subdirectories on a compressed drive. DBLSPACE / DOUBLEGUARD Syntax: DBLSPACE /doubleguard=0|1 The Doubleguard option monitors the integrity of the memory being used by DBLSPACE to minimize memory corruption. Option 8. Option /F .
The letter. it`s host drive. type.Used if you are mounting a CVF file created with the /COMPRESS option (nnn=000). . host: Specifies the uncompressed host drive that contains the CVF you want to access.Used to mount the CVF named DBLSPACE. The default is DBLSPACE.000. Option /info .Option 9. Option 11. total size and CVF files name are displayed for each drive.If you do use this option without specifying a drive the current drive will be assumed. Options =nnn .nnn on the host drive. actual and estimated compression ratio. Option 10. free space. used and free space. d: is the drive letter you want to use for the host drive after the CVF is mounted. and the total size. DBLSPACE / LIST Syntax: DBLSPACE /list Used to display information about all the compressed and uncompressed local drives connected to your computer. Information will not be displayed for networks and CDROM drives. DBLSPACE / INFO Syntax: DBLSPACE [/info] [d:] Used to display information about a specified compressed drive including. /newdrive=d: . When mounting a CVF created with the /CREATE option (nnn>000). DBLSPACE / MOUNT Syntax: DBLSPACE /mount[=nnn] host: [/newdrive=d:] Tells DBLSPACE to associate a drive letter with a compressed volume file (CVF) so that files in the CVF can be accessed as if they were on a disk. d: is the drive letter you want to use for the compressed drive after the CVF file is mounted.
Once you have removed all compressed drives.Option 12.0 to 16. . DBLSPACE / UNCOMPRESS Syntax: DBLSPACE /uncompress d: Used to uncompress a drive previously compressed with DBLSPACE. Option 14. Option 13.Specifies the compressed drive for which you want to change the size. Options =size .Specifies the new estimated compression ratio (from 1. d: .0). This number must be entered with one decimal place. DBLSPACE / RATIO Syntax: DBLSPACE /ratio[=ratio] [d:] [/all] Determines the estimated compression ratio that DBLSPACE will use when compressing a drive.Specifies the space that the CVF on the specified drive should take up on its uncompressed host drive. DBLSPACE will be removed from memory. DBLSPACE / SIZE Syntax: DBLSPACE /size[=size] [/reserve=size] d: Used to change the size of a compressed drive. Options =ratio . You cannot use both =size and /RESERVE=size at the same time. /all .Used to change the estimated compression ratios for all mounted compressed drives.Specifies the amount of free space to be left on the uncompressed host drive are the specified drive is resized. /reserve=size .
DBLSPACE / UNMOUNT Syntax: DBLSPACE /unmount [d:] Used to break the association between a drive letter and a compressed volume file (CVF). This will make the compressed drive temporarily unavailable.Option 15. .
0 or 6.DEBUG (External) DEBUG [pathname] [parameters] An MS-DOS utility used to test and edit programs. DELOLDOS (External) DELOLDOS [/B] Deletes all files from previous versions of DOS after a 5. DELTREE (External) . DEFRAG (External) DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh [/LCD|/BW|/GO] [/H] DEFRAG [d:] [/V][/B][/skiphigh] [/LCD]|/BW|/GO] [/H] Optimizes disk performance by reorganizing the files on the disk. DEL (ERASE) (Internal) DEL (ERASE) [d:][path]filename [/P] Deletes (erases) files from disk.0 installation.
DEVICE (Internal) DEVICE=(driver name) Used in the CONFIG.. this option is used to install the device driver into the upper memory area. DISKCOMP (External) DISKCOMP [d:] [d:][/1][/8] Compares the contents of two diskettes. DEVICEHIGH is used in the CONFIG. ..] Deletes (erases) a directory including all files and subdirectories that are in it. DIR (Internal) DIR [d:][path][filename] [/A:(attributes)] [/O:(order)] [/B][/C][/CH][/L][/S][/P][/W] Displays directory of files and directories stored on disk.SYS file to tell DOS which device driver to load.SYS file to tell DOS which device driver software to use for devices.DELTREE [/Y] [d:]path [d:]path[. DEVICEHIGH (Internal) DEVICEHIGH=(driver name) Like DEVICE. however.
DOSKEY (External) DOSKEY [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]] Loads the Doskey program into memory which can be used to recall DOS commands so that you can edit them.[umb|noumb] Used in the CONFIG. DOSSHELL (External) DOSSHELL [/B] [/G:[resolution][n]]|[/T:[resolution][n]] Initiates the graphic shell program using the specified screen resolution.DISKCOPY (External) DISKCOPY [d:] [d:][/1][/V][/M] Makes an exact copy of a diskette. DOS (Internal) DOS=[high|low]. It is used to load DOS into the upper memory area and to specify whether or not the upper memory blocks will be used. .SYS file to specify the memory location for DOS.
ECHO (Internal) ECHO on|off ECHO (message) Displays messages or turns on or off the display of commands in a batch file.DRIVPARM (Internal) DRIVPARM= /D:(number) [/C] [/F:(form factor)] [/H:(number)] [/I][ /N][/S:(number)] [/T:(tracks)] Used in the CONFIG.SYS file to set parameters for a disk drive. EMM386 (External) EMM386 [on|off|auto] [w=on|off] Enables or disables EMM386 expanded-memory support on a computer with an 80386 or higher processor. EDIT (External) EDIT [d:][path]filename [/B][/G][/H][/NOHI] Starts the MS-DOS editor. EXE2BIN . a text editor used to create and edit ASCII text files.
.]] Expands a compressed file. FASTOPEN (External) FASTOPEN d:[=n][/X] Keeps track of the locations of files for fast access. EXIT (Internal) EXIT Exits a secondary command processor. FASTHELP (External) FASTHELP [command][command] /? Displays a list of DOS commands with a brief explanation of each. .EXE (executable) files to binary format. EXPAND (External) EXPAND [d:][path]filename [[d:][path]filename[ . .(External) EXE2BIN [d:][path]filename [d:][path]filename Converts .
Sys file to specify the maximum number of files that can be open at the same time.SYS file to specify the number of file-control blocks for file sharing. FILES (Internal) FILES=(number) Used in the CONFIG. . FDISK (External) FDISK [/status] Prepares a fixed disk to accept DOS files for storage. FCBS (Internal) FCBS=(number) Used in the CONFIG.FC (External) FC [/A][/C][/L][/Lb n][/N][/T][/W][number] [d:][path]filename [d:][path]filename or (for binary comparisons) FC [/B][/number] [d:][path]filename [d:][path]filename Displays the differences between two files or sets of files.
FOR (Internal) FOR %%(variable) IN (set) DO (command) or (for interactive processing) FOR %(variable) IN (set) DO (command) Performs repeated execution of commands (for both batch processing and interactive processing).] Finds and reports the location of a specific string of text characters in one or more files.FIND (External) FIND [/V][/C][/I][/N] ÒstringÓ [d:][path]filename[... FORMAT (External) FORMAT d:[/1][/4][/8][/F:(size)] [/N:(sectors)] [/T:(tracks)][/B|/S][/C][/V:(label)] [/Q] [/U][/V] Formats a disk to accept DOS files. GOTO (Internal) GOTO (label) Causes unconditional branch to the specified label. .
HELP (External) HELP [command] [/B][/G][/H][/NOHI] Displays information about a DOS command.GRAFTABL (External) GRAFTABL [(code page)] GRAFTABL [status] Loads a table of character data into memory (for use with a color/graphics adapter). GRAPHICS (External) GRAPHICS [printer type][profile] [/B][/R][/LCD][/PB:(id)] [/C][/F][/P(port)] Provides a way to print contents of a graphics screen display. IF (Internal) IF [NOT] EXIST filename (command) [parameters] IF [NOT] (string1)==(string2) (command) [parameters] IF [NOT] ERRORLEVEL (number) (command) [parameters] Allows for conditional operations in batch processing. .
INSTALL (Internal) INSTALL=[d: ][\path]filename [parameters] Used in the CONFIG..SYS file to load memory-resident programs into conventional memory.SYS block within another.SYS file to allow you to use the commands from one CONFIG..INCLUDE (Internal) INCLUDE= blockname Used in the CONFIG. INTERSVR (External) INTERSVR [d:][. INTERLINK (External) INTERLINK [client[:]=[server][:]] Connects two computers via parallel or serial ports so that the computers can share disks and printer ports.][/X=d:][. JOIN .] [/LPT:[n|address]] [/COM:[n|address]][/baud:rate] [/B] [/V] INTERSVR /RCOPY Starts the Interlink server...
LOADFIX (Internal) LOADFIX [d:][path]filename [parameters] Ensures that a program is loaded above the first 64K of conventional memory. LASTDRIVE (Internal) LASTDRIVE=(drive letter) Used in the CONFIG. keyboards. KEYB (External) KEYB [xx][. S. and runs .SYS file to set the maximum number of drives that can be accessed. LABEL (External) LABEL [d:][volume label] Creates or changes or deletes a volume label for a disk.(External) JOIN d: [d:path] JOIN d: [/D] Allows access to the directory structure and files of a drive through a directory on a different drive.][d:][path]filename [/E][/ID:(number)] Loads a program that replaces the support program for U.][yyy][.
expanded. MEMMAKER (External) MEMMAKER [/B][/batch][/session][/swap:d] [/T][/undo][/W:size1. MEM (External) MEM [/program|/debug|/classify|/free|/module(name)] [/page] Displays amount of installed and available memory. including extended. MENUCOLOR (Internal) MENUCOLOR=textcolor. and upper memory. LOADHIGH (Internal) LOADHIGH (LH) [d:][path]filename [parameters] Loads memory resident application into reserved area of memory (between 640K-1M). a program that lets you optimize your computer's memory.the program. .[background] Used in the CONFIG.size2] Starts the MemMaker program.SYS file to set the colors that will be used by DOS to display text on the screen.
[timeout] Used in the CONFIG.] MIRROR [d1:][d2:][. MODE . MIRROR (External) MIRROR [d:]path [d:] path [. MENUITEM (Internal) MENUITEM=blockname.SYS commands to be processed upon reboot.. [menutext] Used in the CONFIG.MENUDEFAULT (Internal) MENUDEFAULT=blockname.SYS file to create a start-up menu from which you can select a group of CONFIG. MKDIR (MD) (Internal) MKDIR (MD) [d:]path Creates a new subdirectory.] [/T(drive)(files)] [/partn][/U][/1] Saves disk storage information that can be used to recover accidentally erased files...SYS file to set the startup configuration that will be used by DOS if no key is pressed within the specified timeout period..
][stopbits][..linetotal) MODE COMn[:]baud[.T] MODE (displaytype. MSAV .][databits][. Can also be used to rename directories.[d:][path]filename[. MORE (External) MORE < (filename or command) (name)|MORE Sends output to console.m[.][parity][.]] destination Moves one or more files to the location you specify..][retry] MODE LPT#[:]=COMn [retry] MODE CON[RATE=(number)][DELAY=(number)] MODE (device) CODEPAGE PREPARE=(codepage) [d:][path]filename MODE (device) CODEPAGE PREPARE=(codepage list) [d:][path]filename MODE (device) CODEPAGE SELECT=(codepage) MODE (device) CODEPAGE [/STATUS] MODE (device) CODEPAGE REFRESH Sets mode of operation for devices or communications.(External) MODE n MODE LPT#[:][n][.][m][. MOVE (Internal) MOVE [/Y|/-Y] [d:][path]filename[.][P][retry] MODE [n]. one screen at a time.
MSCDEX (External) MSCDEX /D:driver [/D:driver2. MSBACKUP (External) MSBACKUP [setupfile] [/BW|/LCD|/MDA] Used to backup or restore one or more files from one disk to another. .] [/E][/K][/S][/V][/L:letter] [/M:number] Used to gain access to CD-ROM drives (new with DOS Version 6). MSD (External) MSD [/B][/I] MSD [/I] [/F[d:][path]filename [/P[d:][path]filename [/S[d:][path]filename Provides detailed technical information about your computer.(External) MSAV [d:] [/S|/C][/R][/A][/L][/N][/P][/F][/video][/mouse] MSAV /video Scans your computer for known viruses. . NLSFUNC .
PATH [d:]path[.] Sets or displays directories that will be searched for programs not in the current directory..SYS file to specify the state of the NumLock key. NUMLOCK (Internal) NUMLOCK=on|off Used in the CONFIG. PAUSE (Internal) PAUSE [comment] Suspends execution of a batch file until a key is pressed.(External) NLSFUNC [d:][path]filename Used to load a file with country-specific information. POWER ..][d:]path[. PATH (Internal) PATH.
. (Beginning with DOS Version 6.(External) POWER [adv:max|reg|min]|std|off] Used to turn power management on and off.. and set levels of power conservation.] Queues and prints data files.. report the status of power management. RECOVER (External) RECOVER [d:][path]filename RECOVER d: Resolves sector problems on a file or a disk. PRINT (External) PRINT [/B:(buffersize)] [/D:(device)] [/M:(maxtick)] [/Q:(value] [/S:(timeslice)][/U: (busytick)] [/C][/P][/T] [d:][path][filename] [. RECOVER is no longer available ). PROMPT (Internal) PROMPT [prompt text] [options] Changes the DOS command prompt.
RESTORE (External) RESTORE d: [d:][path]filename [/P][/S][/B:mm-dd-yy] [/A:mm-dd-yy][/E:hh:mm:ss] [/L:hh:mm:ss] [/M][/N][/D] Restores to standard disk storage format files previously stored using the BACKUP command.REM (Internal) REM [comment] Used in batch files and in the CONFIG.SYS file to insert remarks (that will not be acted on). REPLACE (External) REPLACE [d:][path]filename [d:][path] [/A][/P][/R][/S][/U][/W] Replaces stored files with files of the same name from a different storage location. . RENAME (REN) (Internal) RENAME (REN) [d:][path]filename [d:][path]filename Changes the filename under which a file is stored.
SELECT (External) SELECT [d:] [d:][path] [country code][keyboard code] Formats a disk and installs country-specific information and keyboard codes (starting with DOS Version 6.RMDIR (RD) (Internal) RMDIR (RD) [d:]path Removes a subdirectory. SCANDISK (External) SCANDISK [d: [d: . The set values can be used later by . . .]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono] [/nosummay] SCANDISK volume-name[/checkonly|/autofix[/nosave]|/custom][/mono][/nosummary] SCANDISK /fragment [d:][path]filename SCANDISK /undo [undo-d:][/mono] Starts the Microsoft ScanDisk program which is a disk analysis and repair tool used to check a drive for errors and correct any problems that it finds. SET (Internal) SET (string1)=(string2) Inserts strings into the command environment. this command is no longer available).
SHELL (Internal) SHELL=[d:][path]filename [parameters] Used in the CONFIG.SYS file to specify the command interpreter that DOS should use. SHIFT (Internal) SHIFT Increases number of replaceable parameters to more than the standard ten for use in batch files. SHARE (External) SHARE [/F:space] [/L:locks] Installs support for file sharing and file locking. SETVER (External) SETVER [d:]:path][filename (number)][/delete][/quiet] Displays the version table and sets the version of DOS that is reported to programs. .programs.
(size) Used in the CONFIG.SYS file to set the number of stack frames and the size of each stack frame. [menutext] Used in the CONFIG.SYS file to create a multilevel menu from which you can select start-up options. SUBST (External) SUBST d: d:path SUBST d: /D .SORT (External) SORT [/R][/+n] < (filename) SORT [/R][/+n] > (filename2) Sorts input and sends it to the screen or to a file. SUBMENU (Internal) SUBMENU=blockname. STACKS (Internal) STACKS=(number).
to tell DOS to emulate different hardware configurations. SYS (External) SYS [source] d: Transfers the operating system files to another disk.cc][A|P] Displays current time setting of system clock and provides a way for you to reset the time. TIME (Internal) TIME hh:mm[:ss][.Substitutes a virtual drive letter for a path designation. TREE (External) TREE [d:][path] [/A][/F] . for example. SWITCHES (Internal) SWITCHES= [/K][/F][/N][/W] Used in the CONFIG.SYS file to configure DOS in a special way.
UNFORMAT (External) UNFORMAT d: [/J][/L][/test][/partn][/P][/U] Used to undo the effects of formatting a disk.Displays directory paths and (optionally) files in each subdirectory. UNDELETE (External) UNDELETE [d:][path][filename] [/DT|/DS|/DOS] UNDELETE [/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]] Restores files deleted with the DELETE command. VER (Internal) VER Displays the DOS version number. . TYPE (Internal) TYPE [d:][path]filename Displays the contents of a file.
subdirectories. XCOPY (External) XCOPY [d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P][/S][/V][/W] [Y\-Y] Copies directories.] [/NE][/NX][Ax|/Cx] [/N][/D][/U] VSAFE is a memory-resident program that continuously monitors your computer for viruses and displays a warning when it finds one. .VERIFY (Internal) VERIFY on|off Turns on the verify mode.. and files. the program checks all copying operations to assure that files are copied correctly.. VOL (Internal) VOL [d:] Displays a disk's volume label. VSAFE (External) VSAFE [/option[+|-].
including all established directories and subdirectories. If you do not enter a target designation.ype: External (3.EXE) in the root directory of your fixed disk (remember. to copy all files from a 5 1/4 inch disk to a 3 1/2 inch disk). but with a different disk format (for example. A message will be displayed asking you to specify whether or not the destination file specification is to be stored as a filename or a directory name. If the source is a directory. subdirectories. the destination files will be stored in a directory. XCOPY is a much more powerful copying command than the COPY command. A source designation must always be provided. If you are using XCOPY for this purpose. This command provides a way to copy entire disks full of data. files will be copied to the current directory. when you use the /S option. If XCOPY does not find a directory on the destination disk that matches a PATH specification in the command format. You can add a backslash (\) to the end of the destination filename to make it a directory. you will probably want to make a copy of the program (XCOPY. XCOPY only copies files from subdirectories found WITHIN the current directory). Discussion XCOPY copies files or groups of files to and from directories. the program may display Does (filename) specify a file name or directory name on the target . the directory will be copied onto the destination diskette. This command should be used instead of the DISKCOPY command when you want to create a disk with identical file structures. It is especially useful when backing up your fixed disk. and files. Especially useful for copying data to and from a fixed disk. the second path designation specifies the target file(s). After you enter the XCOPY command. The first path designation specifies the source file(s). If the source to be copied includes more than one file. A common usage would be to use the /S option along with the /D:date option to back up only the files that have been changed since the date of your last backup.2 and later) Syntax: XCOPY [d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P] [/S][/V][/W][Y|-Y] Purpose: Copies directories. the copying will stop.
EXE command to MCOPY.(F = file. see Chapter 6. DOS will automatically check to determine if the target is a filename or a directory name and carry out the copy accordingly.Copies subdirectories.EXE. you must use the /S option also.EXE. enter copy xcopy.Copy terminated due to INT 24 error reading or writing disk For more information about the XCOPY command. /M .User terminated the copy 4 .exe Then. The only difference is that MCOPY will automatically determine whether the target is to be a file or a directory. path not found) 5 . /S . The copied files will still be marked as archive files in BOTH the source and destination files. Options /A . NOTE: Some versions of DOS provide a way to avoid this prompt.Copying was completed without error 1 . the . /E .Copies the same marked archive files as specified in the /A option. you can use the new MCOPY.exe mcopy.EXE program just as you would use XCOPY.No files found 2 . To change the name of the command to MCOPY. invalid syntax.Copies all files in the current directory and in any subdirectory within it. however.Copies only files that have been set as archive files (using the ATTRIB command). If an error is encountered during the XCOPY process.Copies only those files in the source directory that have been changed on or LATER than the specified date. Tips for Advanced Users. D = directory) This means XCOPY cannot determine if you want the specified path designation entry to be sent to a filename on the target disk or to a directory.Initialization error (not enough memory. even if they are empty. the program returns one of the following exit codes: 0 . When using MCOPY. /D:(date) . It is done by renaming the XCOPY. in the downloadable book DOS the Easy Way. If you use this option.
each DOS command must be entered in a particular way: this command entry structure is known as the command's "syntax. /V .Causes XCOPY to replace existing files without a confirmation prompt. you can determine the items that are optional. 2. Space . Example To copy all files and directories (except empty directories) from drive C to drive A. However. /-Y . you will not be prompted before an empty subdirectory is copied. the copying begins as soon as you enter the XCOPY command and press the Enter key). is how YOU enter the command to make it work. enter xcopy c: a: /s Syntax Notes To be functional. The command syntax. Command Name The DOS command name is the name you enter to start the DOS program (a few of the DOS commands can be entered using shortcut names). In this book. for example. The notation [d:].files on the destination disk are no longer marked as archive files. if you are using the /E option. the command is usually printed in uppercase letters. on the other hand. The DOS command name is always entered first." The syntax "notation" is a way to reproduce the command syntax in print. /P . the file will not be copied. but you can enter command names as either lowercase or uppercase or a mix of both.Causes XCOPY to give you a confirmation prompt before replacing an existing file. by looking for information that is printed inside square brackets. /Y .Does not copy the file until you respond to a prompt that asks you to confirm that you want the file copied. /W . indicates an optional drive designation. This switch checks the archive attribute of a file: if the file`s archive attribute is set to off (-A). Command Syntax Elements 1.Each file copied is verified to be sure the file stored on the destination disk is identical to the original on the source disk. For example.Copies only after you respond to a prompt to begin copying (if this option is omitted.
Filename A filename is the name of a file stored on disk. As described in Chapter 1. 9. 8. Switches Characters shown in a command syntax that are represented by a letter or number and preceded by a forward slash (for example. Pathname A pathname (path) refers to the path you want DOS to follow in order to act on the DOS command. For example. A filename extension is not required. if you are working in drive A (when the DOS prompt A> is showing at the left side of the screen) and you want to use the DIR command to display a directory listing of that same drive. 4. Filename Extension A filename extension can follow the filename to further identify it. 5. Whenever you enter a DOS command that deals with disk drives and you are already working in the drive in question. Use of these options activate special operations as part of a DOS command's functions. 6. "/P") are command options (sometimes known as "switches"). some commands are not related to disk drives and therefore do not require a drive designation. 3. you do not have to enter the drive designation. Drive Designation The drive designation (abbreviated in this book as "d:") is an option for many DOS commands.Always leave a space after the command name. As described in Chapter 3. A Colon When referring to a drive in a DOS command. Brackets . The extension follows a period and can be of three or fewer characters. you must always follow the drive designator with a colon (:) (this is how DOS recognizes it as a drive designation). it indicates the path from the current directory or subdirectory to the files that are to be acted upon. 7. DOS always assumes you are referring to the drive you are currently working in (sometimes called the "default" drive). However. If you do not enter a drive designation. you do not have to enter the drive designator. a filename can be of eight or fewer letters or other legal characters.
Items enclosed in square brackets are optional.easydos.html . the command will work in its basic form without entering the information contained inside the brackets. Address: http://www. 11. Ellipses Ellipses (. in other words. Vertical Bar When items are separated by a vertical bar (|).com/dosindex.. but not both. For example: ON | OFF means that you can enter either ON or OFF..) indicate that an item in a command syntax can be repeated as many times as needed. 10. it means that you enter one of the separated items.