DOS-Befehle? Ganz easy!

Willkommen auf meiner Seite über DOS-Befehle – ja, genau, diese „alten“ Texteingaben, mit denen man dem Computer sagt, was er tun soll. Klingt erstmal kompliziert? Keine Sorge! Hier findest du alles verständlich erklärt – von den Basics bis zu den etwas fortgeschritteneren Tricks. Ob du gerade erst anfängst, ein bisschen retro unterwegs bist oder einfach neugierig bist, was man mit ein paar simplen Befehlen alles anstellen kann: Du bist hier genau richtig. Los geht’s mit dem Tipper-Abenteuer!

jump to end


ASSIGN


Type: External (2.0 and later)

Syntax:

ASSIGN
ASSIGN x=y [...] /sta

Purpose: Redirects disk drive requests to a different drive. (In DOS Version 6, this program is stored on the DOS supplemental disk.)

Discussion

Use the ASSIGN command to change drive assignments from the drive indicated by the first letter you enter (x), to the drive indicated by the second letter (y) entered. Do not enter a colon after the drive letters.

Entering the command without any parameters causes all drive reassignments to be reset to normal. The equal sign is optional.

In DOS Version 5 you can use the /sta (status) parameter to display a report of the currently assigned drives.

This command is especially useful when you are using a program that automatically attempts to read or write to a specified drive. By reassigning that drive letter, you tell DOS to ignore requests to the first drive letter and instead carry out both reads and writes on the second drive letter. When you want DOS to again carry out drive requests as usual, enter ASSIGN without any options.

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). 

This command should not be used with other DOS commands that need to get drive information. The FORMAT, DISKCOPY and DISKCOMP will ignore any drive reassignments. Also, don`t use the BACKUP, RESTORE, LABEL, JOIN, SUBST, or PRINT COMMANDS with redirected drives.

Example

assign a=b

DOS sends any requests for drive A to drive B. After this form of the command is entered, 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). For example, enter

assign a=b c=b

Requests for either drive A or drive C would automatically be sent to drive B.

For example, if you enter

dir a:

DOS will display a directory of the files on drive B (not of drive A).

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:



ATTRIB


Type: External (3.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, system, and hidden attributes of a file or directory.

Discussion

Using the ATTRIB command, you can change a file`s read/write attribute or set the archive attribute. If you use this command to specify a file as read-only, the file can be accessed, but not altered or deleted. 

If a file has an attribute of -R, it can be both read from or written to (it is referred to as read/write). If a file has an attribute of +R, it can be read from, but not written to (for example, you can use your word processor to look at it but not to alter it).



NOTE:


If you try to erase a file after you have set its attribute to read-only (+R), DOS will display the words ACCESS DENIED. Before you can erase the file you must use the ATTRIB command to change the file`s attribute to read/write (-R).

The BACKUP, RESTORE, and XCOPY commands can use the archive attribute. 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. 

Wildcard characters (? and *) can be used. However, you CANNOT use a directory name instead of a filename to change the attributes of all files in a directory.

With DOS Version 5 and later you can hide data files by applying the +H (hidden) attribute. -H removes the hidden attribute. The +S (system) and -S options are generally used by programmers to hide and unhide command files used only by DOS. After applying the hidden or system attribute to a file, it will not appear in a directory listing unless you specifically request it with the /A parameter of the DIRECTORY command. 

Options

+R - Use the +R option to make a file read-only. Read-only files may be read but they can`t be changed or deleted.

-R - Use the -R option to change the file protection attribute back to normal (so it can be read, changed, or deleted).

+A - Use the +A option to set the ARCHIVE attribute of a file. When the +A option is used, this flags the file as available for archiving when using the BACKUP or XCOPY commands. 

-A - Use the -A option to turn off the ARCHIVE attribute.

+H - With DOS Versions 4 through 6, use the +H option to set the HIDDEN attribute of a file so that it will not appear in a directory listing.

-H - Use the -H option to turn off the HIDDEN attribute.

+S - With DOS Versions after Version 4, use the +S option to set the SYSTEM attribute of a file. When the +S option is used, this flags the file as a command file used only by DOS. The file will not appear in a directory listing. This attribute is generally reserved for programmers.

-S - Use the -S option to turn off the SYSTEM attribute.

/S - Use the /S switch to set attributes on subdirectories found within the specified path.

Examples

The following form of the command sets the read-only attribute for the file SALES87.TXT:
SALES87 attrib +r a:sales87.txt
SALES87 After you have set the read-only attribute for the file SALES87.TXT, DOS will not allow you to delete or modify it (until the attribute is removed).

SALES87 To set the archive attribute for the file LETTER3.DOC which is in the \LETTERS directory on drive B, enter

attrib +a b:\letters\letter3.doc

After the archive bit has been set, commands such as XCOPY can selectively act on them (using the BACKUP or XCOPY /M switch). For more information, refer to the BACKUP and XCOPY command sections.
To determine the current attribute settings for all of the files in the current directory, enter

attrib *.*

The attribute settings for all of the files on the current directory will be displayed. If, for example, you were working in the \LETTERS directory on the diskette in drive B, ATTRIB would display something like this:

A B:\LETTERS\LETTER3.TXT
A R B:\LETTERS\SALES87.DOC
B:\LETTERS\SALES-N.TXT

This display indicates that three files were found and that the first two had the archive bit set. The second file is also marked as read-only.



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. 

Discussion

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.



Options

/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 searry or the LETTERS subdirectory, enter

append c:\memos;c:\letters

DOS will first search for anOS versions afte 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 current directory, but if it is not found there, DOS will immediately search the \MEMOS and \LETTERS directories on drive B. BR> If you want DOS to search additional directories, you must enter the entire command again, listing all the directories you must be separated by a semicolon. For example, if you want DOS to continue to search the \MEMOS and \LETTERS directories, but R>
append b:;c:\memos;c:\letters


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 current directory, but if it is not found there, DOS will immediately search the \MEMOS and \LETTERS directories on drive B. BR> If you want DOS to search additional directories, you must enter the entire command again, listing all the directories you must be separated by a semicolon. For example, if you want DOS to continue to search the \MEMOS and \LETTERS directories, but R>
append b:;c:\memos;c:\letters





BACKUP


Type: External (2.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, this program is stored on the DOS supplemental disk.)

Discussion

The first path and filename(s) you enter identify the disk file(s) to be backed up. The second drive specified is the drive where the backup copy will be sent. 

If you do not specify the first path, files are backed up from the current directory. If you do not specify a filename or extension, then all files in the directory are backed up.

You can use the wild card characters (* and ?) to specify groups of files to be backed up.

If errors are encountered during the BACKUP process, the ERRORLEVEL exit code is set as follows:

1. No files could be found to back up.
2. Some files were not backed up due to file conflicts.
3. Terminated when you pressed the Ctrl + Break key combination.
4. Terminated due to any other type of error.

These codes can be used with the batch processing IF command to write backup batch files that test for errors during the backup process.

Files backed up using the BACKUP command are stored in a special, compacted format and are therefore not usable for normal file processing. You must use the RESTORE command to recall them and store them in the normal (un-compacted) format.


NOTE:


DOS Versions 3.3 through 5.0 stored backed up files in a different format than earlier versions (the new backup method requires less disk space). In these versions, the BACKUP program creates two files on the backup disk: BACKUP and CONTROL. 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.


Options

/A - 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). Use of this option cancels the prompt to insert a diskette in the target drive before the copying starts, but after the target disk is filled with backed-up files, you will be prompted to insert a new diskette. 


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.2 or earlier. 


/F:(size) Formats the target disk (if it is not already formatted). This option uses the FORMAT program which must, therefore, be accessible via the current path. In DOS Versions 4 and 5, you can use F:(size) if the capacity of the target diskette does not match that of the drive in which you put it. For example, if you are using a 360K diskette in a 1.2M drive, (size) can be 160, 180, 320, 360, 720, 1.2, 1.44, or (in DOS Version 5) 2.88. 

/L Makes an entry in the backup log in the file you specify here. If you use this option but do not specify a backup log file, the system creates the file BACKUP.LOG in the root directory of the source drive. 

The backup log will contain: 

1. The date and time that the files were backed up. 
2. The name of the file that was backed up.
3. The number of the backup disk that contains the file. 

The information stored in this file can be used when you want to restore a particular file from a backup disk. 

If the backup log file you specify already exists, the current entry is added to the existing file.

/M Only backs up files that have been modified since the last time the BACKUP command was used. This switch checks the archive attribute of a file. If the file`s archive attribute is set to off (-A), the file will not be backed up.


NOTE:


If you are backing up files from a diskette, do not write-protect them. BACKUP changes the archive attribute of each file as it is backed up.

/P Packs as many files as possible onto each diskette. This option will create a directory when that is the only way to pack more files onto the diskette.

/S Causes files in the specified directory and all subdirectories below the specified directory to be backed up.

/D:(date) Backs up files only if they have been created or modified on or after the date you enter.

/T:(time) Backs up files only if they have been created or modified on or after the time you enter.


Example

In the following example, 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.

backup c:\letters\sale*.* a:

BACKUP will display a prompt when it is time to insert the disks. If the /A option is not used, there will also be a warning that any files currently stored on the target disk will be erased.




BREAK


Type: Internal (2.0 and later)

Syntax:

BREAK
BREAK on|off

Purpose: Used from the DOS prompt or in a batch file or in the CONFIG.SYS file to set (or display) whether or not DOS checks 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. 

Some application programs automatically reset BREAK (either ON or OFF); this will cancel the BREAK options you set. For more information on the BREAK command, refer to Chapter 6, Tips for Advanced Users.

Examples

Enter 

break on

to tell DOS to check for the Ctrl + C key combination. To determine the current BREAK setting, enter

break



BUFFERS


Type: Internal (2.0 and later)

Syntax:

BUFFERS=(number),(read-ahead number)

Purpose: Used in the CONFIG.SYS file to set the number of disk buffers (a number from 1 to 99) that will be available for use during data input. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations.

Discussion

While conducting input and output operations, DOS stores information in memory buffers so that it will be readily available when requested by an application. The more buffers set in the CONFIG.SYS file with the BUFFERS command, the faster DOS will be able to access the information requested. You should experiment to determine the most efficient number of buffers for your computer and the applications you are running. The same is true for determining the appropriate number of read-ahead buffers. The read ahead buffers determine the amount of data DOS will read from the disk in addition to the data requested by the application. For more information on the BUFFERS command, refer to Chapter 6, Tips for Advanced Users.

Options

number - Sets the number of disk buffers DOS should use (1 to 99). If no value is provided the default value (determined by the amount of memory in your computer) will be used. Generally, if you have 512K of memory, the default will be 15.

read ahead - Sets the number of buffers in the secondary or read-ahead cache. DOS 5.0 allows values of 1 to 8 with 1 as the default. In DOS 6.0 you can specify 0 to 8 with 0 as the default.

Example

To set buffers to 20 and read-ahead buffers to 2 enter the following line in your CONFIG.SYS file
buffers=20,2



CALL


Type: Internal (3.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.

Discussion

Used within a batch file to specify the name of another batch file (a file with the .BAT filename extension). The original batch file calls into action the CALLed batch file. When the CALLed batch file ends, control is transferred back to the original batch file.

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, see Chapter 5, Using Batch Files.

Example

To run the files STARTER.BAT, TESTER.BAT, and FINISH.BAT in sequence, enter the following three lines in your batch file:
call starter
call tester
call finish




CHCP


Type: Internal (3.3 and later)

Syntax:

CHCP
CHCP (codepage)

Purpose: Displays 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 code page is a table that defines the character set for a country.)

Discussion

To use this command, the code page number must have been previously set (refer to Appendix B for more information). 

After this command sets a new code page, DOS will access the COUNTRY command in the CONFIG.SYS file (when the computer is started) to set up special foreign language characters for display or printing. Programs run after using this command to change the code page will use the new code page. 

The NLSFUNC command must be used prior to using 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, 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 change code pages and a device has not been prepared for use with that code page, the code page will still be changed. However, DOS will display an error message similar to the following:

Code page xxx not prepared for device xxx. 

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, enter

chcp 863



CHDIR (CD)


Type: Internal (2.0 and later)

Syntax:

CHDIR (CD) [d:]path
CHDIR (CD)[..]

Purpose: Displays working (current) directory and/or changes to a different directory.

Discussion

Used to change from one directory to another you specify. The command can be used without the drive designator (d:) if you were changing to a different directory on the current drive. The path designator can indicate a subdirectory within another directory or subdirectory, but it must not exceed 63 characters in length. The command followed by two periods (CD..) can be used to change to the parent directory.

Enter CHDIR or CD without a drive and path designation to get a display of the current directory. 

For more information on using CHDIR and other fixed-disk commands, refer to Chapter 3, Using Fixed Disks.

Examples

To demonstrate how the CHDIR command accesses the DOS directory structure, assume that two directories, WORDS and FILES have been created on a disk. These two directories are to be found within the root directory. Assume also that an additional directory, LETTERS is to be found within the WORDS directory.
To change to the directory LETTERS (that is within the directory WORDS) on the root directory of drive C, enter

cd\words\letters

The command indicates the path sequentially down through the directory path: the first backslash indicates the root directory, down through the directory WORDS, down to the target directory LETTERS. 

If you are already working in the WORDS 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, do not enter the leading backslash. For example, if you are working in the WORDS 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. For example, to change from the LETTERS directory to its parent directory, WORDS, enter

cd..

Enter it again to change to the next higher directory (in this case, the root directory).



CHKDSK


Type: External (1.0 and later)

Syntax:

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

Purpose: Checks a disk and provides a file and memory status report.

Discussion

Checks for errors on a disk. Displays error messages (if problems are found) and issues a status report. 

If you specify the /F option, the program will correct non-contiguous errors when it finds them. 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 space is limited on the disk (especially if you have previously erased and replaced files), DOS may store the file in two or more pieces in whatever spaces are available on the disk. If the links between the clusters (blocks of data) are lost, CHKDSK will discover the error and report it. By 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, to create a new file for each, 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 .CHK extension. The first file created will be labeled FILE0000.CHK.

When you use the /F option, CHKDSK also looks for and corrects other types of disk errors (refer to Appendix A for more information about CHKDSK errors). They include:

Allocation 

The size of the space reserved for a file block is incorrect. This can result in the DOS error message

Allocation error in file 

If you run CHKDSK using the /F option, it will alter the size allocation number.

Attribute 

There are a number of possible errors having to do with DOS`s internal record of a file`s attributes. For example, a size of linking attribute associated with one or more files does not match the actual file information. This can result in the error message

Entry has a bad attribute

If you run CHKDSK using the /F option, the program will try to correct the error.

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. This can result in the error message

First cluster number is invalid, entry truncated

If you run CHKDSK using the /F option, the pointer information is corrected (truncated to a zero length file).

The CHKDSK command was also discussed in Chapter 1, Introduction.

Options

/F - Corrects errors when it finds them. 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).

/V - Displays progress messages while CHKDSK is in operation.

filename - If you enter a filename, CHKDSK also reports how many files are stored in non-contiguous blocks (see explanation of non-contiguous blocks above).

Examples

If you enter

chkdsk a:
CHKDSK will analyze the disk in drive A and report a status message. It will look something like this:

362496 bytes total disk space 
53248 bytes in 2 hidden files 
301056 bytes in 8 user files 
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), the number of hidden (system) files stored on the disk, the number of user files stored on the disk, and the amount of storage space still remaining to be used. If you had created directories on the disk, they would be reported in a fifth line. The last two lines do not refer to the disk you specified; they indicate the amount of memory (RAM) in your system and how much of it remains available for use.

If (for example) three lost clusters are found, the program will also display

3 lost clusters found in 3 chains.

Convert lost chains to files (Y/N)?


After this error message is displayed, you should run CHKDSK again, this time using the /F option. 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.CHK
FILE0001.CHK
FILE0002.CHK

Each of these files will contain a lost cluster. You can use your word processor to look at these files to determine which file the lost segment came from. If the lost segment came from a text file you may be able to re-merge it with the main file. However, upon inspection, you may find that the original text file is intact. This may indicate that the lost segment resulted from file management tasks carried out by your word processor (or other type of program). In this case, you can simply delete the newly created segment file.

If the lost segment came from a program file, you probably will not be able to re-merge it. If possible, replace the file by re-copying from the original source. If you cannot replace the file, check the program file that is stored on disk carefully by running all of its features. It may still be operational.



CHOICE


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).

Discussion

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.

Options

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). 

Example

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)


Type: Internal (2.0 and later)

Syntax:

CLS

Purpose: Clears (erases) the screen. 

Discussion

Erases all characters and graphics from the screen; however, it does not change the currently-set screen attributes.

Example

Enter

cls

to clear the screen of everything but the command prompt and the cursor.



COMMAND


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. 

Discussion

Using this command with no options loads a new command processor with the DOS internal programs. Starting a new command processor also creates a new command environment (SET commands are canceled). 

The command processor is loaded in two parts: the transient component and the memory-resident component. The memory-resident part resides in a portion of memory that can occasionally be overwritten by application programs. If that happens, 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.COM program. If COMMAND.COM cannot be found, DOS will terminate operations until the COMMAND program can reload.

Options

device - Specifies a new input/output device at the time the new command processor is loaded.

/C (string) - Performs the command indicated by the string and then returns to the original command processor. 

/E:(size) - Specifies the environment size. The size can be from 160 to 32,768 bytes. The default value is 256 bytes.

/K (command) - Runs the specified command, program, or batch program and then displays the DOS command prompt. This option must be the last one on the COMMAND command line (new with DOS Version 6).

/P - Keeps the secondary command processor in memory from that point in time forward. The EXIT command cannot be used to stop the command processor. The only way to reload the original command processor is by restarting the system. This option should be used only when COMMAND is used with the SHELL command in the CONFIG.SYS file. 

/MSG - Stores all error messages in memory. Useful only if you are running DOS from floppy disks. If you use the /MSG option you must also use the /P option.

/Y - Tells COMMAND.COM to step through the batch file that has been specified with the /C or /K options . This option is useful for debugging batch files (new with DOS Version 6).



Example

If you enter

command /c dir 

DOS will load the secondary command processor, execute the DIR command to show the files on the current drive and directory, and then exit back to the original command processor.

You could use COMMAND.COM in your CONFIG.SYS file in the following way:

SHELL=[[dos-drive:]dos-path]COMMAND.COM[[d:]path][device] [/E:(size)] 

[/P [/MSG]]





COMP


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. (In DOS Version 6, this program is stored on the DOS supplemental disk.)

Discussion

Compares two files or two groups of files. The files can have the same names, or different names. Wildcard characters (? and *) can be used to specify groups of files to be compared (files of the same names will be compared). 

Each set of specified files will be compared, one set at a time. 

Before starting the comparison, the program checks to see if files contain a valid end-of-file mark. COMP will not compare files that do not contain an end-of-file marker. If a specified file does not contain such a mark, 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. You can create the end- of-file marker by pressing and holding the Ctrl key and then pressing the letter Z key.

The COMP program also checks to make sure the file sizes indicated in the directory are the same for compared files; 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, when you press the Enter key the comparison will begin immediately; therefore, you should make sure the diskette(s) containing the files to be compared are already in the specified drives. If you want to change diskettes after entering the command, enter the command name with no following parameters. If you enter the COMP command with no options , the program will prompt you for the file and/or path designations. 

First, the program will display:

Enter primary filename

Enter the name of the first file or group of files. Next, the program will display:

Enter 2nd filename or drive ID

After you enter the second filename(s), the program will compare the files, issuing reports on its progress.

If the files are identical, it will report:

Files compare OK

If the files are not identical, it will report on the differences it finds.

COMP will display the memory locations of any portions of the compared files that do not match. After ten mismatches, the program terminates the comparison. The following message is displayed

10 Mismatches - ending compare

After all pairs specified have been compared, COMP will display

Compare more files (Y/N)?

To enter more files to compare, press the letter Y key. To terminate the comparisons, press the letter N key.

Options

/A - Displays the differences found between compared files as characters.

/C - Performs a comparison that is not case-sensitive.

/D - Displays the differences found between compared files in decimal format. (The default format is hexadecimal.)

/L - Displays the number of the line where the difference occurred, rather than the byte offset.

/N:(number) - Allows you to enter the number of lines in both files that will be compared, even if the files are of different sizes.


Examples

To compare all the files ending in .TXT on drive A with all of the files ending in .TXT on drive B, enter

comp a:*.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:\letters b:\letters




COPY


Type: Internal (1.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[...] [d:][path][filename] [/V]

Purpose: Copies or appends files. 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. However, COPY can also be used to create new files. By copying from the keyboard console (COPY CON:) to the screen, files can be created and then saved to disk. 

The first filename you enter is referred to as the source file. The second filename you enter is referred to as the target file. If errors are encountered during the copying process, the COPY program will display error messages using these names.

Unlike the BACKUP command, copied files are stored in the same format they are found in. The copied files can be used just as you would use the original (whether the copied file is a data file or a program).

COPY can also be used to transfer data between any of the system devices. Files may also be combined during the copy process.


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 file will be copied with the same name. If you attempt to copy a file to the same directory without providing a new name, DOS will cancel the copy and display the message 

File cannot be copied onto itself 

The COPY command was also discussed in Chapter 1, Introduction.

Options

/Y - Causes COPY to replace existing files without providing a confirmation prompt. By default, if you specify an existing file as the destination file, COPY will provide a confirmation prompt. (In previous versions of DOS, existing files were simply overwritten.) 

/-Y - Displays a confirmation prompt before copying over existing files.

/A - Used to copy ASCII files. Applies to the filename preceding it and to all following filenames. Files will be copied until an end-of-file mark is encountered in the file being copied. If an end-of-file mark is encountered in the file, the rest of the file is not copied. DOS will append an end-of-file mark at the end of the copied file.

/B - Used to copy binary files. Applies to the filename preceding it and to all following filenames. Copied files will be read by size (according to the number of bytes indicated in the file`s directory listing). An end-of-file mark is not placed at the end of the copied file.

/V - Checks after the copy to assure that a file was copied correctly. If the copy cannot be verified, the program will display an error message. Using this option will result in a slower copying process.



Examples



The first filename you enter is the source file; the second file is the target file. To copy the file TEST.DOC from the current directory to drive B (with the same name), enter



copy test.doc b:

To copy the file TEST.DOC to the current directory with the new name, TEST2, enter



copy test.doc test2

To copy and combine (concatenate) the files TEST1.DOC and TEST2.DOC to a new file, TEST3, enter



copy test1.doc+test2.doc b:test3

You can also combine files by using wildcard characters (? and *). To copy all files with a .DOC filename extension on drive C to a new file ALLDOCS on drive B, enter



copy c:*.doc b:alldocs

Other, more complicated, combinations are also possible while copying. For example, to combine all files with a .TXT filename extension with all files that have the same filename and a .DOC extension, copying the newly combined file to a new file on drive B with an .ADD extension, enter



copy *.txt+*.doc b:*.add

In this case, the file TEST.TXT will be combined with the file TEST.DOC resulting in a combined file with the filename TEST.ADD.




COUNTRY


Type: Internal (3.0 and later)

Syntax:

COUNTRY=country code,[code page][,][d:][filename]

Purpose: Used in the CONFIG.SYS file to tell DOS to use country-specific text conventions during processing.

Discussion

The COUNTRY command affects the following items: date and time formats, the thousands and decimal characters used in numbers, the location and symbol used for currency, upper-to lowercase conversions, and alphabetical sorting order. The filename indicates a file that contains country-specific information (the default file name is COUNTRY.SYS).

An application program must be written to support the international features of DOS, otherwise the settings specified with the COUNTRY command will be ignored (refer to Appendix B for country-specific information).



Options



countrycode - A three-digit number used to specify the country code you want to use. The countrycode numbers are generally based on the international long-distance telephone codes. The default value is 001 for the United States.

codepage - Specifies the character set to be used for the specified country. The default code page for the specified country will be used if no codepage is entered. 

Example

To set the country to the United States using the default codepage using the COUNTRY.SYS file located in the DOS directory on drive C, enter

country=001,,c:\dos\country.sys




CTTY


Type: Internal (2.0 and later)

Syntax:

CTTY (device)
Purpose: 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. It cannot be used for peripheral devices such as a printer. However, DOS does not check to make sure you have entered a valid device name. If, for example, you specify a printer, DOS will attempt to read from the device, producing an error condition.

Affects only programs that use standard DOS calls. 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, enter

ctty aux

To change back to the standard I/O device enter

ctty con



DATE


Type: Internal (1.0 and later)

Syntax:

DATE
DATE mm-dd-yy

Purpose: Displays current date setting and provides a way to reset the date. 

Discussion

You can enter the DATE command alone and the program will prompt you when to enter the date. You can also enter the date at the same time you enter the date command. Either way, 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. This date will be shown when you use the DIR command to display information about files. 

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. 

For information on using the PROMPT command to display the date, refer to Chapter 6, Tips for Advanced Users. 

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, or type in the date using the format shown. Be sure to enter one or two numbers to indicate the month, then a hyphen, one or two numbers to indicate the day of the month, another hyphen, and one or two numbers to i ndicate the year. For example, to set the date on May 24, 1994, enter

5-24-94




DBLSPACE


Type: External (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, beginning with Version 6. It provides a way to increase disk capacity by compressing the data on all or part of a disk.

Discussion

To start the full-screen interface of the DBLSPACE disk-compression program you enter

dblspace

by itself on the command line. Then, you control each individual aspect of the DBLSPACE program by entering options and parameters at the DOS command line. The sections that follow describe each of the DBLSPACE options that are available.


NOTE:


Some versions of DOS 6 may not include the DBLSPACE program. In addition, 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, especially when DBLSPACE is used in combination with the SMARTDrive program. However, it has also been reported that these problems were fixed in the 6.2 version of DOS. Some versions of DOS may include other methods of compressing stored data.

Option 1. DBLSPACE / AUTOMOUNT

Syntax:

DBLSPACE / automount=drive

Enables or disables automatic mounting of removable drives. The default is for automatic mounting of removable drives. You cannot use this command while Windows is running.

Option

drives - Specifies the removable drives that you want DBLSPACE to automatically mount. 


Option 2. DBLSPACE / CHKDSK

Syntax:

DBLSPACE /chkdsk [/F] [d:]

Tells DBLSPACE to check the structure of a compressed drive and report any errors found. Using the /F option will cause DBLSPACE to attempt to fix found errors. (This option is not available with DOS 6.2. You should use the SCANDISK utility instead.)

Option

/F - Tells DBLSPACE to repair any errors that it finds.

Option 3. DBLSPACE / COMPRESS

Syntax:

DBLSPACE /compress d: [/newdrive=host:] [/reserve=size] [/F]
Used to compress the files on an existing hard disk, floppy disk, or other removable disk.

Options

/newdrive=host - Specifies the uncompressed host drive after compression. If not specified, the next available drive letter will be used. (You can abbreviate newdrive as new.)

/reserve=size - Specifies the amount of space to be left uncompressed on the host drive. The default for hard disks is 2M and for floppy disks, 0.

/F - Causes DBLSPACE to return to the DOS command prompt when compression is finished rather than displaying compression statistics. 

Option 4. 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. This option can only be used on nonremovable drives.

Options

/newdrive=host - The new compressed drive. The default is the next available letter.

/reserve=size - Specifies the amount of space to be left uncompressed on the host drive. If you omit both the /reserve and size options , 1M of uncompressed space will be reserved on your disk. You cannot use the /SIZE and /RESERVE options at the same time.

/size=size - Specifies the size of the compressed volume file that will be created on the host drive. You cannot use the /SIZE and /RESERVE options at the same time.


Option 5. DBLSPACE / DEFRAGMENT

Syntax:

DBLSPACE /defragment [d:] ]/F]

Used to defragment a compressed drive. This is accomplished by moving all of the drive`s free space to the end of the drive. To stop the defragmenting process, press the Esc key.

Option

/F - Tells DBLSPACE to defragment the drive more completely.


Option 6. DBLSPACE / DELETE

Syntax:

DBLSPACE /delete d:

Used to unmount a compressed drive and delete its compressed volume file from the host drive. To delete all the files on a compressed drive, it is better to use the DBLSPACE/FORMAT option.

Option 6. 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.

Option

0|1 0 disables DoubleGuard and 1 enables it.

Option 7. DBLSPACE / FORMAT

Syntax:

DBLSPACE /format d:

Used to delete all files and subdirectories on a compressed drive, leaving the drive intact.

Option 8. DBLSPACE / INFO

Syntax:

DBLSPACE [/info] [d:]

Used to display information about a specified compressed drive including, it`s host drive, used and free space, actual and estimated compression ratio, and the total size.

Option

/info - If you do use this option without specifying a drive the current drive will be assumed. 

Option 8. DBLSPACE / LIST

Syntax:

DBLSPACE /list

Used to display information about all the compressed and uncompressed local drives connected to your computer. The letter, type, free space, total size and CVF files name are displayed for each drive. Information will not be displayed for networks and CD-ROM drives.

Option 8. 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. 

Options

=nnn - Used to mount the CVF named DBLSPACE.nnn on the host drive. The default is DBLSPACE.000.

host: Specifies the uncompressed host drive that contains the CVF you want to access.

/newdrive=d: - Used if you are mounting a CVF file created with the /COMPRESS option (nnn=000). d: is the drive letter you want to use for the host drive after the CVF is mounted. When mounting a CVF created wf a compressed drive.

Options

=size - -t to use for the compressed drive after the CVF file is mountedd take up on its uncompressed host drive.

/reserve=size - Specifies the amount of free space to be left on the u Dmpressed host drive are the specified drive is resized. You cannot use both =size and /RESERVE=size at the same time.

atio - Specifies the new estimated compression ratio (from 1.0 to 16.0). This number must be entered with one decimal place.

/all - Used to change the estimated compression ratios for all mounted compressed drives. 

Option 10. DBLSPACE / SIZE

Syntax:

DBLSPACE /size[=size] [/reserve=size] d:

Used to change the size of a compressed drive.

Options

=size - - Specifies the space that the CVF on the specified drive should take up on its uncompressed host drive.

/reserve=size - Specifies the amount of free space to be left on the uncompressed host drive are the specified drive is resized. You cannot use both =size and /RESERVE=size at the same time.

d: - Specifies the compressed drive for which you want to change the size.

Option 11. DBLSPACE / UNCOMPRESS

Syntax:

DBLSPACE /uncompress d: 

Used to uncompress a drive previously compressed with DBLSPACE. Once you have removed all compressed drives, DBLSPACE will be removed from memory.

Option 12. 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.




DEBUG


Type: External (1.0 and later)

Syntax:

DEBUG [pathname] [parameters]

Purpose: An MS-DOS utility used to test and edit programs.

Discussion

The DEBUG utility is a programmer`s tool that provides access to your computer at the hardware level. More extensive information on the DEBUG utility and its functions are provided in the Technical Reference manual provided by Microsoft.

CAUTION:


Be sure that you know what you are doing when using the DEBUG utility. This is a powerful programmer`s tool that can be used to gain access to your computer at the hardware level. If you are not careful, you could cause such damage as erasing your hard disk or locking up your keyboard.





DEFRAG


Type: External (6.0 and later)

Syntax:

DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh [/LCD|/BW|/GO] [/H]
DEFRAG [d:] [/V][/B][/skiphigh] [/LCD]|/BW|/GO] [/H]

Purpose: Optimizes disk performance by reorganizing the files on the disk (new with DOS Version 6).

Discussion

You should start DEFRAG only from MS-DOS. Starting DEFRAG from a program such as Microsoft Windows may cause you to lose data. The following is a list of DEFRAG exit codes:

0 The defragmentation was successful.
1 An internal error occurred.
2 The disk contained no free clusters. To operate, DEFRAG needs 1 free cluster.
3 The user pressed CTRL+C to stop the process.
4 A general error occurred.
5 DEFRAG encountered an error while reading a cluster.
6 DEFRAG encountered an error while writing a cluster.
7 An allocation error occurred. To correct the error, use the SCANDISK command.
8 A memory error occurred.
9 There was insufficient memory to defragment the disk.


Options

/F Used to defragment files, ensuring that the disk contains no empty spaces between files.

/U Used to defragment files, leaving empty spaces between files.

/S Used to control the way in which files are sorted in their directories. Without this option, the current order of files will be maintained. You can use any combination of the following sort options . Do not put spaces between the values.

N Alphabetical order by name.
N- Reverse alphabetical order by name.
E Alphabetical order by extension.
E- Reverse alphabetical order by extension.
D By date and time, earliest first.
D- By date and time, latest first.
S By size, smallest first.
S- By size, largest first

/B Used to restart your computer after files have been reorganized.
/skiphigh Used to load DEFRAG into conventional memory, rather than in upper memory.

/LCD Specifies an LCD color scheme.
/BW Specifies a black and white color scheme.
/GO Used to disable the graphic mouse and graphic character set.
/H Used to move hidden files.

Example

If you want to load DEFRAG into conventional memory and run it specifying that the files on drive C be sorted alphabetically by name, enter the following:

defrag c: /f /sn /skiphigh 




DEL (ERASE)


Type: Internal (1.0 and later)

Syntax:

DEL (ERASE) [d:][path]filename [/P]

Purpose: Deletes (erases) files from disk.

Discussion

You can use wildcard characters (? and *) to delete groups of files. If you don`t specify a pathname, the program assumes the files to be deleted are on the drive and directory you are currently using. The /P option prompts you to enter a Y or N for each file selected for deletion.


CAUTION

:
Be careful when you use this command with wildcard characters: groups of files can be erased with one command entry. For example, if you enter 

del t*.* 

all files in the current directory that begin with the letter T will be immediately erased. 

For more information on using the DEL command, refer to Chapter 2, Using Common DOS Commands.

Examples

To erase the file LETTER3.TXT from the LETTERS directory on the diskette in drive B, enter

del b:\letters\letter3.txt

To erase all the files in the current directory, enter

del *.*

If you use this form of the command (to delete all files in a directory), the program will display the prompt

Are you sure (Y/N)?

If you are sure you are deleting the files you want to delete, press the letter Y key to start the erasing process.





DELOLDOS


Type: External (5.0 and later)

Syntax:

DELOLDOS [/B]

Purpose: Deletes all files from previous versions of DOS after a 5.0 or 6.0 installation.

Discussion

During an upgrade installation of DOS 5.0 or 6.0, your previous version of DOS is stored in a directory named OLD_DOS.1 and on uninstall disks created by the DOS Setup program. After you have finished installing and testing the new version of DOS, you can delete your old version of DOS by using the DELOLDOS command. Once you have used the DELOLDOS command, you will not be able to restore your previous version of DOS from the Uninstall disks so be sure that the new version of DOS works on your computer before using this command. Also, the DELOLDOS command will delete itself from your disk once it has finished deleting your old version of DOS.

Options

/B - Specifies a black-and-white screen mode. Used with LCD displays or when using a monochrome monitor attached to a CGA adapter.





DELTREE


Type: External (6.0 and later)

Syntax:

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

Purpose: Deletes (erases) a directory including all files and subdirectories that are in it (new with DOS Version 6).

Discussion

Unlike the RMDIR command, the DELTREE command allows you to delete a directory even if it contains files and subdirectories. All files and subdirectories subordinate to the directory you are deleting will also be deleted regardless of any attributes. This means that even if a file has hidden, system, read-only, or other attributes, it will still be deleted. You can specify more than one directory for deletion.

CAUTION:



When using wildcards with the DELTREE command you should be extremely cautious because both directories and files with names that match the wildcard will be deleted. 


Option

/Y - Carries out the DELTREE command without providing a prompt to confirm the deletion.

Examples

To delete the directory LETTERS including all files and subdirectories containedin it, enter

DELTREE c:\letters




DEVICE


Type: Internal (2.0 and later)

Syntax:

DEVICE=[d:][\path]\filename [parameters]

Purpose: Used in the CONFIG.SYS file to load device drivers into conventional memory.

Discussion

This command allows you to use devices with your computer system that are not normally supported by DOS. Many installation programs will insert a device driver into your CONFIG.SYS file automatically. If you want to maintain a copy of your original CONFIG.SYS file, you should make a backup of it before running an installation program of this type. DOS executes device drivers in the order in which they appear in the CONFIG.SYS file. For some device drivers the order of execution is important. 

For more information on the DEVICE command, refer to Chapter 6, Tips for Advanced Users.

The following is a list of the device drivers provided with MS-DOS:

ANSI.SYS
EGA.SYS 
PRINTER.SYS
CHKSTATE.SYS
EMM386.EXE
RAMDRIVE.SYS
DBLSPACE.SYS
HIMEM.SYS
SETVER.EXE
DISPLAY.SYS
INTERLINK.EXE
SMARTDRV.EXE
DRIVER.SYS
POWER.EXE
SMARTDRV.SYS


NOTE:


SMARTDRV.EXE has replaced SMARTDRV.SYS in DOS Version 6.0.


Options

parameters Used to specify any parameters required by the device driver. They are passed by DOS to the driver when it is loaded into memory.

Example

To use the file ANSI.SYS as the standard device driver, enter the following line in your CONFIG.SYS file:
device=c:\dos\ansi.sys




DEVICEHIGH


Type: Internal (5.0 and later)

Syntax:

DEVICEHIGH=[d:][\path]\filename [parameters]
DEVICE [/L:region, min;region,min...] [/S] =[d:][\path]\filename
DEVICE [size=hexsize] [d:][\path]\filename [parameters]

Purpose: Used in the CONFIG.SYS file to load device drivers into upper memory. 

Discussion

Before DOS can load a device driver into upper memory, there must be an upper memory block (UMB) provider (such as EMM386) available and there must be enough space in that UMB. If there is not enough space in the UMB, the device driver will be loaded into conventional memory. You can check to see which device drivers have been loaded into high memory by using the /MEM /C command. 

DOS executes device drivers in the order in which they appear in the CONFIG.SYS file. For some device drivers the order of execution is important. 

If you load a device driver into high memory and then find that your system will not boot, you can press the F5 key to bypass the CONFIG.SYS file or you can press F8 to choose, interactively, the CONFIG.SYS lines you want to execute. (This feature is available only with DOS Version 6. If you are using an earlier version of DOS, you can use a bootable disk from the floppy drive to bypass the problem CONFIG.SYS file.) 

For more information on the DEVICEHIGH command, refer to Chapter 6, Tips for Advanced Users.

The following is a list of the device drivers provided with MS-DOS that can be loaded into high memory:

ANSI.SYS
EGA.SYS 
DBLSPACE.SYS
PRINTER.SYS
DISPLAY.SYS
RAMDRIVE.SYS
DRIVER.SYS
SETVER.EXE


Options

parameters Used to specify any parameters required by the device driver. They are passed by DOS to the driver when it is loaded into memory.

/L:region, min - Available with DOS Version 6, this option specifies the region in upper memory and the minimal size in bytes which the device driver should occupy. More than one region can be specified if you separate each region with a semicolon. This option must precede the filename of the device driver. 

/S - Available with DOS Version 6, tells DOS to shrink the UMB to the size specified by the /L option and create a new UMB from the remainder. This option must precede the filename of the device driver. 

size=hexsize - Available with DOS Version 5 and later, this option specifies the minimum size memory block into which DOS should attempt to load the driver. This option must precede the filename of the device driver. 

Example

To use the file ANSI.SYS as the standard device driver and to load it into the upper memory area, enter the following line in your CONFIG.SYS file:
devicehigh=c:\dos\ansi.sys




DIR


Type: Internal (1.0 and later)

Syntax:

DIR [d:][path][filename] [/A:(attributes)] [/O:(order)] [/B][/C][/CH][/L][/S][/P] [/W] 

Purpose: Displays directory of files and directories stored on disk.

Discussion

In addition to files and directories, DIR also displays both the volume name and amount of free storage space on the disk (if there are files stored in the current directory). Note that both of these are for the entire DISK, not just for the path you specified.

The DIR command is also useful if you want to know what directories have been created on the specified disk. The directories will be displayed along with the files on the disk. They can be identified by the DIR label that follows the directory name.

Wildcard characters (? and *) can be used to specify groups of files. 
For more information on using the DIR command, refer to Chapter 2, Using Common DOS Commands.

When you use the DIR command, it will display all files that match the path and filename specifications, along with their size in bytes and the time and date of their last modification. If you don`t enter one of the options, the entire list will be displayed, even if the list is too long to fit on one screen. To limit the amount of data displayed, use either of the two options described below.

Options

/A:attributes Only the files whose attributes match the ones you specify will be displayed. You can enter a sequence of attributes after the colon. It is not necessary to enter spaces between entries. This option is available with DOS Versions 5 and 6.

The possible attributes are:

H|-H - Hidden (or not hidden) files.
S|-S - System (or non system) files.
D|-D - Directories (or files only).
R|-R - Read-only (or read/write) files.
A|-A - Archivable (or already archived) files.
/O:order - Allows you to specify the order in which the entries will be displayed. This option is available with DOS Versions 5 and 6.

The possible options are:

N|-N - By name (alphabetical or reverse alphabetical).
E|-E - By extension ( alphabetical or reverse alphabetical).
D|-D - By date and time (chronologically or reverse).
S|-S - By size (increasing or decreasing).
C|-C - Sorts by DoubleSpace compression ratio lowest to highest or highest to lowest. (Version 6.0 only)
G|-G - Group directories (before, or after) other files.
/B - (Bare format) Displays only file names.
/C - Displays the compression ratio of files compressed using DBLSPACE. This option is available with DOS Version 6.
/CH - Displays the compression ratios ofXT

To display only files on drive C that have no filename extension, enter

tion is available with DOS Version 6 DIR command will also display directories. They can be identified by the DIR label that follows the directory name.

plays file entries in the specified directory and all subdirectories located below it hierarchically.
/P - Pauses when the screen is full. Press any key to display another screen full of data.
/W - Displays only filenames and directory names (without the added information about each file) in a five-wide display format.

Examples

To display only files with the .TXT filename extension on the current drive that begin with the letters FIL , enter

dir fil*.TXT

To display only files on drive C that have no filename extension, enter

dir c:*.

This form of the DIR command will also display directories. They can be identified by the DIR label that follows the directory name.




DISKCOMP


Type: External (1.0 and later)

Syntax:

DISKCOMP [d:] [d:][/1][/8]

Purpose: Compares the contents of two diskettes.

Discussion

DISKCOMP compares two disks, track by track, and displays the numbers of tracks that are not identical.

If you enter only one drive designation, DISKCOMP compares with the disk in the currently active drive.

If you enter one drive designation that is the same as the current drive (or if you don`t enter a drive), the comparison will take place on one drive. DISKCOMP will prompt you when it is time to insert each disk to be compared.

Disks copied using the DISKCOPY command should be reported to be identical when checked using this command; however, disks copied using the COPY command may not be identical since DOS may not copy files to the same locations on the disk.

Options

/1 - Causes only the first side of the disk to be compared (even if the disk is double-sided).

/8 - Causes only 8 sectors per track to be compared (even if the disk contains a different number of sectors per track).

If differences are found on a track, the program will display an explanatory message. For example, if track eight on side one are not the same, DOS will display

Compare error(s) on track 8, side 1



Back to the Home Directory


**Next Commands comming soon, please comming back soon


TOP


Weiter