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