COPA

DOS Commands - An Overview

Disk Operating System (DOS) Commands

 डिस्क ऑपरेटिंग सिस्टम (डॉस) कमांड्स | Disk Operating System (DOS) Commands

DISK OPERATING SYSTEM (DOS) Overview

MS-DOS (Microsoft Disk Operating System), like any other operating system, manages the flow of information to and from the various parts of the computer system.

DOS Functions

MS-DOS includes commands that perform the following tasks:
  ⇨   Manage files and directories
  ⇨   Maintain disks
  ⇨   Configure hardware
  ⇨   Optimize the use of memory
  ⇨   Customize MS-DOS

DOS Architecture

MS-DOS is partitioned into layers to isolate the logic of the operating system and the user perception of the system from the hardware it is running on. These layers are:
  ⇨   BIOS (Basic Input Output System)
  ⇨   DOS Kernel
  ⇨   Command Processor (Shell)

BIOS (Basic Input Output System)

The BIOS is specific to the individual computer system and is provided by the manufacturer of the system. It contains software to handle the devices such as Console display or Keyboard (CON), Printer (PRN), System Clock etc. Most of these primitive BIOS functions are located in the ROM (Read Only Memory) so that they can be used by other applications and the system start-up program.

DOS Kernel

The Kernel is a software supplied by Microsoft that provides a collection of hardware independent services called system functions. These functions include:
  ⇨   File and record management
  ⇨   Memory management
  ⇨   Execution of system related programs
  ⇨   Character device input/output

Command Processor (Shell)

Shell is the user interface to the operating system. It processes and executes the user commands, including loading and executing of other programs from the disk.

System Start-up | DOS Booting Process

When you switch on the computer, the system start-up program from ROM carries out the POST (Power-On Self Test).
The BIOS is read into RAM during system initialization as a part of a file named IO.SYS.
The DOS kernel (MSDOS.SYS file),followed by the DOS shell (COMMAND.COM file) are then read into memory from the secondary storage device (i.e. hard disk). This process is known as booting the system.
While booting the system the secondary storage device from where the IO.SYS kernel and shell are loaded is referred to as the boot disk.
The first floppy drive in the system is generally referred to as the drive A, the second floppy drive as the drive B, and the hard disk drive as the drive C.
Depending on the boot disk used, the system at the end of booting prompts the user by displaying either A> or C> on the monitor.
When you get either A> or C>prompt, it indicates that the system is now ready to accept commands from the user.
To boot the system, your boot disk or boot diskette should have the following files:
  ⇨   IO.SYS
  ⇨   MSDOS.SYS
  ⇨   COMMAND.COM

DOS Information Management

The information on your computer is stored in files. The instructions used to run a program are stored in program files, and the information/data you create by using a program is stored in data files.

Directories and Subdirectories

A disk can hold several hundreds of files. Organizing files into directories and subdirectories on a disk is like storing office files in drawers (directories) and its compartments (subdirectories) within a file cabinet (disk). Generally, a directory would contain a group of related files.
If you have several reports like daily, weekly, monthly reports and expense statements like fixed expenses, daily expenses, then you can create two subdirectories “REPORT” and EXPENSE.
The daily, weekly, monthly reports can then be stored in the “REPORT” subdirectory. The fixed, daily expenses can be stored in the “EXPENSE” subdirectory.

Files

Each file in MS-DOS is uniquely identified by its name and its location. The location in turn has two components, the logical drive that contains the file and the directory on the drive where the file name can be found.

The ROOT Directory

Every disk has two kinds of directories the ROOT directory and OTHER subdirectories.
The ROOT directory is always present and subdirectories of ROOT directory can be created and nested to any level. If a directory is created within a directory, then it is called a subdirectory. Therefore, except the ROOT directory, all other directories are subdirectories.
The ROOT directory is denoted by a backslash (“\”).
All directories, except the ROOT, must be given a name.
A directory can contain files and/or subdirectories.

Current Drive/Directory

The current drive refers to the drive the user is currently working on. For example, A:, B:, C: etc.
Similarly, the current directory refers to the directory within which the user is currently working. For example, “\”, “\DATABASE”, “\LOTUS\DATA” etc.
MS-DOS keeps track of the current drive, i.e. “A:” for the floppy disk or “C:” for the hard disk, and uses this information as the default drive when file specifications do not include an explicit drive name. Similarly, MS-DOS maintains a current directory for each logical drive.
The organization of the directories, the subdirectories, and the files is called the directory tree or the directory structure.

Path

The string specifying the filename, its drive, and its directory is called as the path.

Absolute and Relative Path

You can refer to a particular file or directory on a drive by either Specifying its location relative to the ROOT directory - ABSOLUTE PATH.
Or by specifying its location relative to the current directory - RELATIVE PATH

The Path is specified by giving the list of subdirectories separated by a backslash (\).
The Absolute Path always begins with the backslash (ROOT - \) building upto the desired file or subdirectory.
The Relative Path should NEVER begin with the backslash (ROOT - \).

Rules for Naming a File/Directory

A filename/directory consists of 2 parts: a primary name and an extension. The extension (secondary name) is optional. The following rules need to be observed: The primary name should not exceed 8 characters in length. The extension should not exceed 3 characters in length.
for example : filename.txt Special characters such as > < , . \ / * ? | ~ and spaces cannot be used as a part of the filename or extension.

Different Types of DOS Commands

MS-DOS shell provides 3 categories of DOS commands
  ⇨   Internal Commands.
  ⇨   External Commands.
  ⇨   Batch Files or Command Files.

Internal Commands

The internal commands are directly executed from the RAM. These commands are part of the “COMMAND.COM” file, which is loaded into the RAM at the time of booting. For example: VER, DIR, REN, DEL, COPY etc.

External commands

The external commands are the names of the programs stored in the disk files. Before these programs can be executed they must be loaded from the disk into the RAM. For example, CHKDSK, FORMAT, Scandisk etc.

Batch commands

Batch files are text files that contain a list of internal, external or batch commands which are executed in sequence when the batch file is executed ( by typing in the name of the file). AUTOEXEC.BAT is a batch file which gets executed automatically on booting. This file contains certain start-up instructions. All the batch files will have an extension “.BAT”.

DOS Commands | Editing Controls

Several keys on the keyboard perform special tasks. MS-DOS uses some of these special keys for editing the commands at the DOS prompt C:>.

Keys Function
F1 Retype one character at a time from the last command entry from the current cursor position.
F2 Retypes all characters from the last command entry up to the one identical to your next keystroke.
F3 Retypes all remaining characters from the last command entry.
F4 Stores all characters beginning at the first match with your next Keystroke and ending with the last command entry.
BkSpace Erases character to the left of the cursor.
F6 Places a special end-of-file code at the end of the currently open file; sometimes referred to as a CTRL-Z
Ins Permits insertion of characters at the cursor.
Del Permits deletion of the character to the left of the cursor.
Esc Abandon the currently constructed command and the next prompt appears.

If the user has used a “DIR” as his previous command and wants to repeat the “DIR” command, then the user simply presses the F3 key for MS-DOS to automatically retype the DIR at the prompt.
If the user has keyed in COPY MYFILE.DAT A: and wants to repeat the COPY command, the user can press the F1 key 5 times for MS-DOS to retype COPY at the prompt and then specify another file name and press ENTER key.

DOS Commands | DIR

The DIR Command an Internal Command. This command displays a list of files and subdirectories within a specific directory. Type the Command as follows and press Enter Key:

C:\>DIR

It displays:

DIR Command displays:
  ⇨   Disk's volume label - given by the user.
  ⇨   Serial number - generated by the system.
  ⇨   Directory or filename with the file name extension.
  ⇨   File size in bytes.
  ⇨   Date and time the file was last modified.
  ⇨   Total number of files listed.
  ⇨   Cumulative size of the files listed.
  ⇨   Free space in bytes remaining on the disk.

DOS Commands | DIR/P

□ To see the contents of a directory one screen at a time, use the /P switch as follows:

C:\>DIR /P

You will be prompted to press any key to proceed to the next screen(s).

DOS Commands | DIR/W

□ To see the listing in a wide format with five file/directory names on each line, use the /W switch as follows :

C:\>DIR /W

Individual file sizes, date and time of last modification are not displayed.

DOS Commands | DIR with Drive and Path

You may also specify a drive and/or path to view its file and subdirectory names.

C:\>DIR D:

Displays the list of files and subdirectories of the current directory of drive D. ( You can also use DIR D:/P or DIR D:/W )

C:\>DIR C:\Users

Displays the list of files and subdirectories of the subdirectory \User.

DIR with wildcard * and ?

You can use wildcards (? and *) to display a select listing of a group of files and subdirectories :
an * is used to represent zero or more any characters a ? is used to represent zero or any single character

C:\>DIR *.TXT

Displays all filenames with any primary name which have an extension .TXT.

C:\>DIR S*.*

Displays all filenames starting with S and having any extension.

C:\>DIR S??.*

Displays all filenames whose primary name starts with a S, whose length does not exceed 3 characters and can have any extension.

DIR Sorted

- To display the directory listing in SORTED order :

C:\>DIR /O

Displays first the subdirectories, then the files SORTED in an alphabetic order.

DIR Commands Options Function
DIR /O : N Sorting is in alphabetic order by name
DIR /O : -N Sorting is in reverse alphabetic order by name
DIR /O :D Sorting is by date and time, earliest first
DIR /O :-D Sorting is by date and time, latest first
DIR /O :S Sorting is by size, smallest first
DIR /O :-S Sorting is by size, largest first
DIR /L Displays directory names and filenames in lower-case.
DIR /B Displays the listing without the heading and the summary information.

DOS Commands | COPY Command

This is an Internal Command. This command creates a duplicate of one or more files. While copying within the same directory a new name has to be specified.
While copying into another drive/directory the same name could be preserved.
When using a COPY command you type the location and filename of the file you want to copy from (Source), followed by the location and the filename of the file you want to copy to (Destination).

C:\> COPY Source Destination

- To copy the contents of OLDFILE.DAT to NEWFILE.DAT

C:\>COPY OLDFILE NEWFILE

If NEWFILE.DAT does not exist, it is created. If not, its existing contents are overwritten.
If OLDFILE.DAT does not exist, then you will get a message
file not found – OLDFILE 0 file(s) copied

DOS Commands | COPY with wildcards "* and ?"

- You may also use the wildcards "*" and "?" as follows:

C:\>COPY *.DBF D:

copies all the files in the current directory with the extension .DBF to the floppy drive A. - To copy file(s) into the current directory, the destination need not be specified:

C:\>COPY D:KEYS.DAT

KEYS.DAT from the floppy drive A will be copied into the current directory. - To verify that the new file(s) has been copied accurately use /V :

C:\>COPY OLDFILE NEWFILE /V

COPY to Combine Files

- COPY can also be used to combine the contents of two or more files:

C:\>COPY MARCH.DAT+APRIL.DAT REPORT.DAT

This combines the files MARCH.DAT, and APRIL.DAT from the current directory and places them in a file named REPORT.DAT.

DOS Commands | Create file with COPY CON

COPY CON command can be used for creating a file from the keyboard:

C:\>COPY CON TEXT.DAT

CON is used as the source file, so in effect your keyboard becomes the source file. Whatever is typed on the Keyboard, is copied to the file TEXT.DAT. You finish typing into the file by pressing CTRL-Z (F6) and then pressing ENTER to close the file.

DOS Commands | COPY for Displaying a File

- Similarly, COPY can also be used for displaying the contents of a file onto the screen.

C:\>COPY TEXT.DAT CON

here CON is used as the destination file, so in effect your monitor becomes the destination file. The contents of TEXT.DAT will be displayed on the screen. CON is a DOS reserved word which stands for CONSOLE i.e. the terminal (Keyboard + Monitor).

DOS Commands | TYPE Command for Displaying a File

This is an Internal Command. This command displays the contents of a text file on the screen.
If you display a binary file or a file created by a program you may see strange characters on the screen.

C:\>TYPE MYDATA.DAT

displays the contents of the file MYDATA.DAT.
- Wildcard characters cannot be used with this command.

TYPE with Output Redirection (>)

The TYPE command along with the output redirection (>) symbol can be used to print the contents of a text file on a printer.

C:\>TYPE MYDATA.DAT > PRN

will redirect the contents of the file MYDATA.DAT to the printer. PRN is a DOS reserved word for printer.

DOS Commands | REN Command for Renaming a File

This is an Internal Command. This command changes the name of a file or files.

C:\>REN NEW.DAT TRY.DAT

The name of NEW.DAT is changed to TRY.DAT.
If TRY.DAT already exists, DOS displays the following message :
Duplicate file name or file not found.

REN with wildcards * and ?

- You can also use wildcard characters with the REN command.

C:\>REN *.TXT *.DOC

results in only the extensions of all the filenames in the current directory changing from .TXT to .DOC.
- You cannot use this command to rename files across drives or to move files to a different directory location or to rename subdirectories.
The following uses of the RENAME command are thus INVALID:
C:\>REN MYDAT.DAT A:\NEWDAT C:\>REN C:\DATABASE C:\DATABASE4

C:\>REN MYDAT.DAT \DATABASE\MYDAT.DAT

In all these cases DOS will display an appropriate error message.

DOS Commands | DEL or ERASE Command for Deleting a File

This is an Internal Command. This command deletes the specified files. Once you delete a file from your disk you may not be able to recover it.

C:\>DEL TRY.TXT

deletes the file by the name TRY.TXT from the current directory.

DEL with wildcards * and ?

- The wildcard characters * and ? may also be used:

C:\>DEL *.DOC

deletes all files with the extension .DOC from the current directory.
- The following command can be used to delete all the files from the current directory or the specified path :

C:\>DEL *.*


DOS displays the following prompt

All files in directory will be deleted Are you sure (Y/N)?
Press Y and ENTER to delete all files in the current directory, or press N and then ENTER to cancel the deletion.

WARNING : BE CAREFUL WHILE USING THE ABOVE COMMAND !!!

DEL with Other Switches

- You may use the /P switch to prompt the user before deletion:

C:\>DEL TEXT.DAT /P

DOS will prompt you to confirm for deletion as follows :

C:\TEXT.DAT, Delete (Y/N)?


depending on your response, the file will be deleted or left intact.

DEL A:\*.* /P

C:\>
You will be prompted to confirm the deletion of each file in turn.
USE /P WITH EVERY DEL COMMAND AS A SAFETY MEASURE !!!

DOS Commands | MD or MKDIR Command for Making a Directory

This is an Internal Command. This command creates a directory.
When you have a group of logically related files (used with only one program or files that form a specific project or those that have some logical link), you may want to store them in their own directory.

C:\>MD TAXES


creates a subdirectory in the current directory having a name TAXES.

C:\>MD D:\PROPERTY


creates a subdirectory having a name PROPERTY on D drive.

C:\>MD C:\DATABASE\DATA


creates a subdirectory having a name DATA in the \DATABASE directory of the C drive.
- If the directory name specified with MD already exists then DOS displays the following error message :
Directory already exists.
- If the path specified with MD is not valid then DOS displays the message :
Unable to create directory.

DOS Commands | CD or CHDIR Command for Change a Directory

This is an Internal Command. Displays the name of the current directory or changes the current directory.
For e.g. consider the following directory structure of C: drive \ (ROOT)
MYFILE
DATABASE
TAXES
DOS
WINDOW
DATA
REPORT
GAMES

C:\>CD

This will display the current directory

C:\>CD DATABASE\DATA

If the current directory is ROOT (\) this command will take you to \DATABASE\DATA directory and make it the current directory.
- The above process can also be broken up into 2 commands
CD DATABASE- first changes to \DATABASE directory and makes it current CD DATA- then changes to \DATABASE\DATA directory and makes it current.
CD with Absolute Path - Specify the complete path, when you want to change from anywhere in the directory structure to any other directory

C:\>CD \DATABASE\DATA

Unlike the previous example, this command will change to \DATABASE\DATA directory irrespective of the current position, and make it the current directory.
-Supposing the current directory is now \DATABASE\DATA, you can change to WINDOW\GAMES using the following command :

C:\>CD \WINDOW\GAMES


here the path starts with the ROOT (\), so it is an absolute path.
- .. stands for the parent directory, CD .. will always take you to the parent directory of the current directory.

C:\DATABASE\DATA>CD ..


If the current directory at the time of issuing the above command was \DATABASE\DATA, then the current directory will change to \DATABASE.
If the current directory at the time of issuing the above command was C:\ (ROOT), then DOS displays the error message :
Invalid Directory. CD to Change the Drive
- For changing from one drive to another drive, type in the drive name followed by a colon (:)

C:\>D:


will make the floppy drive A as the current drive.

D:\>C:


will similarly make drive C as the current drive.

DOS Commands | The RD or RMDIR Command for Remove a Directory

This is an Internal Command. This command is used for deleting (removing) a directory. Before deleting a directory, delete all its files and subdirectories. The directory must be empty except for the . and .. directories. You cannot delete the current directory. You must first change to a different directory (which is not a subdirectory of the current directory).

C:\>RD TAXES


This command will remove the directory TAXES provided it is empty and your current directory is C:\ (ROOT). RD with Absolute Path - You may specify the complete path to the directory to be removed.

C:\>RD \DATABASE\DATA

this command will remove the directory \DATABASE\DATA provided it is empty and your current directory is NOT C:\DATABASE\DATA. If the current directory is C:\DATABASE\DATA, then DOS displays: Attempt to remove current directory - C:\DATABASE\DATA. If the directory C:\DATABASE\DATA is not empty, then DOS displays: Invalid path, not directory, or directory not empty.

DOS Commands | The DATE Command

This is an Internal Command. - To see or set the date, use:

C:\>DATE

DOS will display:

Current date is Sat 01-09-1993
Enter new date (mm-dd-yy):_

To change the date, you will have to type in the month-date-year. To retain the displayed date, just press ENTER.

DOS Commands | The TIME Command

This is an Internal Command. - To see or set the time, use:

C:\>TIME

DOS will display:

Current time is 1:23:31p
Enter new time :_

To change the time, you will have to type in the hour:min:sec. To retain the displayed time, just press ENTER. The hours have to be specified using the 24 hour format, i.e. 2pm will be specified as 14:00:00.

DOS Commands | The VOL Command

This is an Internal Command. This command displays volume label and serial number, if they exist. A serial number is displayed for a disk formatted with MS-DOS version 4.0 or later.

C:\>VOL

This displays the volume and serial number of the disk in the current drive.

C:\>VOL D:

This displays the volume and serial number of the disk in drive D.

DOS Commands | The VER Command

This is an Internal Command. This command displays the MS-DOS version number.

C:\>VER

For the above command, MS-DOS will display the following message: MS-DOS Version 6.0

DOS Commands | The CLS Command

This is an Internal Command. - To clear the screen, use:

C:\>CLS

This will clear the screen and place the prompt in the top left hand corner of the screen.

DOS Commands | The PROMPT Command

Thi s is an Internal Command. - By default the prompt is always set to the name of current drive followed by the > sign. To get the default prompt, use:

C:\>PROMPT

This will change the prompt to
C>
Customize the PROMPT - To customize the prompt to display any text, use

C:\>PROMPT MYPROMPT

This will change the prompt to MYPROMPT> PROMPT with options - To set the prompt to display the current working directory, use

C>PROMPT $P$G

This will change the prompt to the current working directory. If your current working directory is \DATABASE, then the new prompt will be C:\DATABASE> The $P in the above command signifies the current drive and path, and $G signifies the > (greater than) symbol. - The other options used with PROMPT are, $Q for = (equal sign) $$ for $ (dollar sign) $T for current time $D for current date $V for MS-DOS version number Any combination of the above options can be used with the PROMPT.

DOS Commands |The FORMAT Command

This is an External Command. The FORMAT command creates a new ROOT directory and a File Allocation Table (FAT) for the disk. It also checks for the bad areas on the disk and deletes all the data on the disk. In order for MS-DOS to be able to use a new disk you must use this command to format the disk. - To format a new floppy disk, use

C:\DOS>FORMAT A:

As FORMAT is an external command your current directory at the time of issuing the command should be the directory containing the file FORMAT.COM or FORMAT.EXE. The formatted capacity of the disk will depend on the type of the disk and the drive. FORMAT with /S Switch - When a disk is formatted with "/S" option the disk can be used as a bootable disk.

C:\DOS>FORMAT A:/S

This copies the ~OS~ files required for booting the machine (IBMBIO.SYS, MSDOS.SYS and COMMAND.COM) from your systems start-up drive to the newly formatted disk. This disk can now be used for booting the machine.

DOS Commands | FORMAT Command for FORMAT a Hard Disk

- To format a hard disk, use

C:\>FORMAT D:

/S, /Q, /U switches can also be used while formatting the hard disk. WARNING : AS FORMAT DELETES ALL EXISTING DATA, USE THIS COMMAND WITH EXTREME CAUTION !!! Any disk formatted (except with /U switch) may be later unformatted using the UNFORMAT command. ***

DOS Commands | The BACKUP Command

This is an External Command. The BACKUP command backs up one or more files from one disk to another. You can backup files onto either a hard disk or floppy disks. BACKUP source destination-drive - Source specifies the location of files to be backed up. - Destination-drive specifies the drive on which you want to store any backup files. The backed-up files are stored in the backup.nnn and control.nnn files, where nnn represents the backup-disk number.

C:\DOS>BACKUP C:\TC A:

Will backup all files in the C:\TC subdirectory to the floppy disk(s). BACKUP with Switches - The /S switch can be used to backup the contents of all files in the source (including the contents of its subdirectories).

C:\DOS>BACKUP C:\TC A: /S

will backup all files in the C:\TC subdirectory as well as all files in the subdirectories of C:\TC to the floppy disk(s). - The /N switch can be used to backup only those files that have changed since the last backup.

C:\DOS>BACKUP C:\TC A: /N

- The /D:date switch can be used to backup only those files that have changed on or after the specified date

C:\DOS>BACKUP C:\TC A: /D:01-10-2022

will backup all files in the C:\TC subdirectory that have changed since the date 01-12-1992. *******

DOS Commands | The RESTORE Command

This is an External Command. The RESTORE command restores files that were backed up by using the BACKUP command. RESTORE drive1 drive2:path - drive1 specifies the drive on which the backed up files are stored. - drive2:path specifies the path to which the backed up files will be restored.

C:\DOS>RESTORE A: C:\TC\*.*

will restore all the previously backed up files from the floppy disk(s) to the subdirectory C:\TC - The /S switch can be used to restore all the backed up files to their original directories and the subdirectories.

C:\DOS>RESTORE A: C:\TC\*.* /S

will restore all backed up files to their original directories and subdirectories (from where they were backed up). *********

DOS Commands | The DISKCOPY Command

This is an External Command. This command copies the contents of one floppy disk from the source drive to a formatted or unformatted floppy disk in the destination drive. This command copies the data from a particular position on the source disk to exactly the same position on the destination disk.

C:\DOS>DISKCOPY A: B:

will copy the contents of the disk in drive A to the disk in drive B. If only a single drive is present then the source and the destination drives can be the same. /V switch can be used to verify that the disk is copied correctly.

C:\DOS>DISKCOPY A: B:/V

****

DOS Commands | The DISKCOMP Command

This is an External Command. This command performs a track by track comparison of 2 floppy disks.

C:\DOS>DISKCOMP A: B:

will compare the disk in the drive A with the disk in the drive B. If the disks being compared are the same then the message "compare OK" is displayed. If not MS-DOS reports an error message Compare error on **********

DOS Commands | PRINT Command for Print a File

This is an External Command. This command prints a text file(s) while you are using the other MS- DOS commands. Since the speed of the printer is slow the file(s) that are to be printed can be sent to a queue. On using the PRINT command one file at a time is taken from the queue on a "first come first serve" basis and is printed. The printing process is on as a BACKGROUND process i.e. the computer can simultaneously be used to carry out other activities in the FOREGROUND.

C:\>PRINT

will install the resident part of the print routine in the memory, display the list of files in the queue and the present status.

C:\>PRINT MYFILE

will send the file by name MYFILE to the queue which will be printed once the printer is free. PRINT with Switches

C:\>PRINT /Q:N

sets the maximum queue length to N number of files.

C:\>PRINT /T

removes all the files from the print queue. *******

DOS Commands | CHKDSK Command for Check a HardDisk

This is an External Command. Displays the status report for a disk, with the following details: The total disk space Number of bytes occupied by the hidden files Number of bytes occupied by the subdirectories Number of bytes occupied by the user files Number of bytes in bad sectors Number of bytes in each allocation unit (Cluster) Total allocation units on the disk The number of free allocation units Total bytes in the main memory (RAM) Number of bytes free on RAM

C:\>CHKDSK C:

will check and display the status of the hard disk. If the drive is not specified the current drive is assumed.

C:\>CHKDSK D:/V

will display the name of each file in every directory as the disk is checked. CHKDSK with /F Switch - To fix the errors on the disk, use /F switch:

C:\DOS>CHKDSK D:/F

This prompts with a confirmation message similar to the following: 10 lost allocation units found in 3 chains Convert lost chains to files?_ If you press Y, MS-DOS saves each lost chain as a file in the ROOT directory with the file name FILEnnn.CHK. If you press N, MS-DOS fixes errors on the disk but does not save the contents of the lost allocation units. ***

DOS Commands | The TREE Command

This is an External Command. Graphically displays the directory structure of the path or of the in a drive.

C:\WINDOWS>TREE

will display the directory structure for the current directory.

C:\>TREE \

will display the directory structure for the entire disk as the path specified in this case is the ROOT(\) of the current drive.

C:\DOS>TREE D:

will display the directory structure of the default directory of the floppy drive A./

C:\DOS>TREE C:\USERS /F

will display the directory structure of the @\TC@ subdirectory alongwith the names of files in each subdirectory within \TC *******

DOS Commands | The LABEL Command

This is an External Command. The LABEL command creates, changes or deletes the volume label (name) of a disk. - To label a floppy with DOSCBT as its name use: C:\DOS>LABEL A:DOSCBT This will label the floppy disk in drive A as DOSCBT.

C:\DOS>LABEL A:

This command will display the following message Volume in drive A is xxxxx Volume Serial Number is xxxx-xxxx Volume label (11 characters, ENTER for none)? If only ENTER is pressed and the label for the floppy already exists then MS-DOS prompts you with Delete current volume label (Y/N)? Pressing Y at this prompt will delete the existing label. *******

DOS Commands | The UNFORMAT Command

This is an External Command. The UNFORMAT command restores a disk erased by the FORMAT command. - To unformat a floppy formatted (without the /U option), use

C:\DOS>UNFORMAT A:

DOS Commands | The UNDELETE Command

This is an External Command. The UNDELETE command restores the files previously deleted with the DEL command. When a file is deleted, DOS overwrites the first character of the file name by a special character and releases all the space occupied by that file. Undelete can work successfully only if this space which was released has not been overwritten by some other file. The following command specifies that UNDELETE is to recover all deleted files in the specified directory, one at a time and to prompt for confirmation on each file.

C:\DOS>UNDELETE A:

After confirmation this command will prompt for the first character of the file name.

DOS Commands | HELP Command

For a brief explanation and the syntax summary of any command use a /? with the command.

C:\DOS>TYPE /?

will display the help screen for the @TYPE@ command. - Similarly, for other commands,

C:\DOS>COPY /?
C:\DOS>REN /?
C:\DOS>DIR /?

For a brief explanation of the commands (internal, external and batch) use the HELP command.

C:\DOS>HELP

- Similarly, for a brief explanation of any command use, C:\DOS>HELP MD

PDF Downlaod DOS Commands | An Overview







Computer Hindi Notes | Learn Computer in Hindi


HTML Hindi Notes for ITI-COPA, CCC, DCA, PGDCA





Online MCQ Test Series in Hindi







Tags - What is MS DOS? How to use Microsoft Disk Operating System? How to Open DOS in Windows? Different DOS Commands? Internal and External DOS Commands. Using DOS Commands for File Management. Different DOS Commands. Various DOS Commands. DOS Commands Switch. How to use Switch in DOS. DIR, CD, MD, RD, Type, Date, Time, Prompt, COPY, Vol, Ver, COPY CON, Format, Del, CHKDSK, SCANDISK, XCOPY DOS Commands. Disk Operating System (DOS) Commands. Internal and External DOS Commands. File Management with DOS. Using Switch in DOS Commands. Practical Use of DOS
डिस्क ऑपरेटिंग सिस्टम क्या है? डिस्क ऑपरेटिंग सिस्टम (DOS) के क्या उपयोग है? कम्प्युटर में डिस्क ऑपरेटिंग सिस्टम (DOS) को कैसे प्रयोग करें? डिस्क ऑपरेटिंग सिस्टम (DOS) में फाईल बनाना, सेव करना, फाइल देखने हेतु कमांड्स. डिस्क ऑपरेटिंग सिस्टम (DOS) की कमांड्स को प्रयोग कैसे करें? डॉस (DOS) क्या है ? DOS full form. What is Dos in Hindi. एमएस डॉस का उपयोग कैसे करें? Internal & External DOS Commands in Hindi. MS DOS commands in Hindi. Computer Hindi Notes PDF Books Downloads. डिस्क ऑपरेटिंग सिस्टम इन हिंदी.



 

||    Theory    ||    Practicals    ||    Video Tutorials    ||    Online Test Series   ||