Social Media Platforms

MS-DOS External Commands, Filters, Attributes and Batch Files

 What Is an Operating System?

An Operating System (OS) is a set of programs that manages and controls a computer’s hardware and software resources. It acts as an interface between the user and the computer hardware, providing an environment in which users can run application programs.

A computer system can broadly be divided into four main components:

  1. Hardware – Physical components such as the CPU, memory, keyboard, mouse, monitor, and printer.
  2. Operating System – Manages and coordinates the use of hardware resources.
  3. Application Programs – Software programs that perform specific tasks for users.
  4. Users – People who interact with the computer system.

The Operating System manages and coordinates all these components, ensuring that computer resources are used efficiently and applications run properly.


    Functions of an Operating System

    The major functions of an operating system include:

    • Input/Output Device Management: Controls and coordinates input and output devices such as the keyboard, mouse, monitor, printer, and plotter.
    • Memory Management: Allocates and manages the computer's memory among different programs and processes.
    • File and Storage Management: Organizes, stores, retrieves, and manages files and data on storage devices.
    • CPU Scheduling: Allocates CPU time to different processes and manages their execution.
    • Process Management: Controls running processes and coordinates their execution.
    • Program Execution: Loads, initiates, executes, and supervises application programs.
    • Error Handling: Detects and handles hardware and software errors and takes appropriate corrective actions.
    • User Interface: Provides a command or user interface through which users can interact with the computer system.

    Examples of Operating Systems

    Some commonly known operating systems include:

    • UNIX – including Solaris, IRIX, HP-UX, Linux, and DEC UNIX
    • MS-DOS (Microsoft Disk Operating System)
    • Windows 95/98
    • Windows NT
    • OS/2

    In simple terms, the Operating System is the main software that manages computer hardware and provides a platform for application programs to run. Without an operating system, using a modern computer efficiently would be extremely difficult.

     

    Disk Operating System

    A Disk Operating System (DOS) is an operating system or operating-system component designed to manage secondary storage devices and the information stored on them. It provides an abstraction layer for disk storage and supports the organization and management of files through file systems.

    The term DOS may be used in two ways:

    • Specifically: It refers to an operating system or component designed to manage disk-based storage devices, such as floppy disks and hard disks.
    • Generically: It can refer to an operating system that is loaded from a disk and provides facilities for managing disk devices and the files stored on them.

    Role of a Disk Operating System

    In the early days of microcomputers, available memory was very limited. As a result, the disk operating system was often implemented as an extension of the main operating system and was loaded only when required. Without this component, disk access was generally limited to low-level operations, such as reading from and writing to individual disk sectors.

    The disk operating system provided higher-level facilities for working with storage. Instead of requiring users or programs to work directly with individual sectors, it allowed them to create, organize, access, modify, and manage files.

    In some systems, the disk operating system component—or even the entire operating system—was simply referred to as DOS.

    Examples of DOS

    Examples of disk operating systems include:

    • DOS/360
    • FreeDOS
    • MS-DOS (Microsoft Disk Operating System)

    On IBM PC-compatible computers, the term DOS became associated with an entire family of operating systems, including MS-DOS and other compatible DOS implementations.

    In Simple Terms

    A Disk Operating System (DOS) is software that helps a computer manage disks and the files stored on them. It provides the necessary facilities for organizing and accessing information on storage devices.

     

    Features of MS-DOS

    MS-DOS (Microsoft Disk Operating System) is a command-line operating system developed by Microsoft. It was widely used on personal computers before the widespread adoption of Microsoft Windows and played an important role in the early development of PC operating systems.

    Compared with modern operating systems, MS-DOS had limited capabilities and a relatively simple interface. It did not support multitasking, meaning that generally only one program could run at a time. A program had to finish execution or be manually stopped before another program could use the available memory and system resources.

    Despite its limitations, MS-DOS introduced or popularized several concepts that are still familiar to Windows users today. These include the use of file names, drive letters, and commands for managing files and directories.

    Main Features of MS-DOS

    Some important features of MS-DOS are:

    • Command-Line Interface: Users interact with the computer by typing commands at the command prompt.
    • Single-Tasking: MS-DOS primarily runs one program at a time.
    • File Management: It provides commands for creating, copying, deleting, renaming, and organizing files.
    • Directory Management: Users can create, remove, and navigate through directories.
    • Drive Letters: Different storage devices are identified using drive letters, such as A:, B:, and C:.
    • Low Memory Requirements: MS-DOS was designed to operate on computers with limited memory and hardware resources.
    • Disk Management: It provides facilities for accessing and managing information stored on disks.
    • Batch Processing: Users can execute a sequence of commands automatically through batch files.

    Components of MS-DOS

    MS-DOS consists of four essential system components along with a collection of additional utility programs.

    The four main components are:

    1. Boot Record
    2. IO.SYS
    3. MSDOS.SYS
    4. COMMAND.COM

    1. Boot Record

    The Boot Record contains the information and instructions required to start the computer and load the operating system. During the booting process, the system uses the boot record to locate and load the necessary MS-DOS system files.

    2. IO.SYS

    IO.SYS is a system file that provides basic input/output services and works closely with the computer's hardware. It contains essential routines that allow MS-DOS to communicate with devices such as the keyboard, display, and storage devices.

    3. MSDOS.SYS

    MSDOS.SYS contains the core functions of MS-DOS. It provides important operating-system services, including file management, memory management, and program management.

    4. COMMAND.COM

    COMMAND.COM is the MS-DOS command interpreter. It accepts commands entered by the user, interprets them, and executes the appropriate internal or external commands.

    Examples of commonly used DOS commands include:

    • DIR – Displays files and directories
    • COPY – Copies files
    • DEL – Deletes files
    • REN – Renames files
    • CD – Changes the current directory
    • CLS – Clears the screen

    In addition to these four essential components, MS-DOS includes various utility programs that provide additional functions for file management, disk management, system configuration, and other tasks.

    Internal Commands of MS-DOS

    Internal commands are also known as memory-resident commands. These commands are automatically loaded into the computer's memory during the booting process and are included in the COMMAND.COM command interpreter.

    Because they are already loaded into memory, internal commands can be executed immediately after the DOS prompt appears. They do not require a separate program file for their execution.

    Some commonly used internal commands are:

    VER, VOL, DATE, TIME, CLS, DIR, MD, CD, PATH, RD, COPY CON, TYPE, COPY, DEL, REN, PROMPT, and TREE.

    DOS commands can generally be entered in either uppercase or lowercase letters. For example, DIR, dir, and Dir are interpreted in the same way.

    Internal vs. External Commands

    The main difference is that internal commands are built into COMMAND.COM and are loaded into memory during startup, whereas external commands are stored as separate executable files. An external command cannot be executed if its corresponding program file is unavailable.

     

    1. VER Command

    The VER command displays the version number of the operating system currently in use. The version number indicates the particular release or edition of the operating system.

    Syntax:

    VER

    Example:

    C:\>VER

    Result:

    Microsoft Windows XP [Version 5.1.2600]

     

    2. VOL Command

    The VOL command displays the volume label and serial number of the current drive.

    Syntax:

    VOL [drive:]

    Example:

    C:\>VOL

     

    3. DATE Command

    The DATE command displays the current system date and allows the user to enter a new date.

    Syntax:

    DATE

    Example:

    C:\>DATE

     

    4. TIME Command

    The TIME command displays the current system time and allows the user to enter a new time.

    Syntax:

    TIME

    Example:

    C:\>TIME

     

    5. CLS Command

    The CLS (Clear Screen) command clears the contents displayed on the DOS screen.

    Syntax:

    CLS

    Example:

    C:\>CLS

    After execution, the screen is cleared and the DOS prompt is displayed again.

     

    6. DIR Command

    The DIR (Directory) command displays a list of files and directories contained in the current directory. It can also display information such as file names, sizes, dates, and attributes.

    Syntax:

    DIR [drive:][path] [switches]

    Common DIR Switches

    Switch

    Purpose

    /P

    Displays one screen of information at a time.

    /W

    Displays file and directory names in a wide format.

    /B

    Displays only file and directory names.

    /L

    Displays names in lowercase letters.

    /A

    Displays files and directories according to specified attributes.

    Common File Attributes

    Attribute

    Meaning

    H

    Hidden files

    -H

    Files that are not hidden

    S

    System files

    -S

    Files that are not system files

    D

    Directory names

    -D

    Items that are not directories

    R

    Read-only files

    -R

    Files that are not read-only

    Example:

    C:\>DIR

    Using Wildcard Characters

    The DIR command can be used with wildcard characters to search for groups of files.

    Example 1:

    C:\>DIR *.TXT

    This displays all files with the .TXT extension.

    Example 2:

    C:\>DIR D???.*

    This displays files whose names begin with D and contain four characters in the filename, regardless of their extension.

    The two commonly used wildcard characters are:

    • * – Represents any number of characters.
    • ? – Represents any single character.

     

    7. MD or MKDIR Command

    The MD (Make Directory) or MKDIR command is used to create a new directory.

    Syntax:

    MD [drive:]path

    or

    MKDIR [drive:]path

    Example:

    C:\>MD SAMS

    This creates a directory named SAMS.

     

    8. CD or CHDIR Command

    The CD (Change Directory) or CHDIR command is used to change the current directory.

    Syntax:

    CD [drive:][path]

    Example:

    C:\>CD SAMS

    This changes the current directory from C:\ to C:\SAMS.

     

    9. PATH Command

    The PATH command defines a list of directories that DOS searches when looking for external commands or executable programs.

    Syntax:

    PATH

    Displaying the current search path:

    C:\>PATH

    To clear the search path:

    C:\>PATH;

    When the search path is cleared, DOS searches for external commands only in the current directory.

     

    10. RD Command

    The RD (Remove Directory) command is used to delete an empty directory.

    Syntax:

    RD [drive:]path

    Example:

    C:\>RD SAMS

    The directory must normally be empty before it can be removed using the basic RD command.

    Common Switches

    • /S – Removes the specified directory, including its subdirectories and files.
    • /Q – Uses quiet mode and does not ask for confirmation when used with /S.

    Example:

    C:\>RD SAMS /S /Q

     

    11. COPY CON Command

    The COPY CON command can be used in DOS to create a new text file directly from the command prompt.

    Syntax:

    COPY CON filename

    Example:

    C:\>COPY CON SAMS.TXT

    After entering the command, type the required text. When finished, press Ctrl+Z or F6, followed by Enter, to save the file.

     

    12. TYPE Command

    The TYPE command displays the contents of an existing text file on the screen.

    Syntax:

    TYPE filename

    Example:

    C:\>TYPE SAMS.TXT

    The contents of SAMS.TXT are displayed on the screen.

     

    13. COPY Command

    The COPY command is used to copy one or more files from one location to another. It can also be used to copy a file while giving the copy a different name.

    Syntax:

    COPY source destination

    Example 1:

    C:\>COPY SAMS.TXT A:\TAJ

    This copies SAMS.TXT to the specified location.

    Example 2:

    C:\>COPY SAMS.TXT C:\SAMS_1\FO\RECEPTION

    This copies the file to the specified directory.

    Copying a File with a New Name

    A file can also be given a different name while it is being copied.

    Example:

    C:\>COPY OLD.TXT C:\DOS\NEW.TXT

    Here, OLD.TXT is copied to the C:\DOS directory and saved as NEW.TXT.

     

    14. DEL or ERASE Command

    The DEL (Delete) or ERASE command is used to delete one or more files from a disk.

    Syntax:

    DEL filespec [/P]

    or

    ERASE filespec [/P]

    Example 1:

    C:\>DEL C:\*.BAK /P

    This attempts to delete .BAK files from the specified location and prompts for confirmation.

    Example 2:

    C:\>DEL ABC.TXT

    Example 3:

    C:\>DEL ????.COM

    This deletes .COM files whose filenames contain four characters.

    Common Switches

    • /P – Prompts for confirmation before deleting files.
    • /Q – Quiet mode; suppresses confirmation prompts where supported.

     

    15. REN Command

    The REN (Rename) command is used to change the name of a file or directory.

    Syntax:

    REN oldname newname

    Example:

    C:\>REN SAMS.TXT SAMS1.TXT

    This changes the filename from SAMS.TXT to SAMS1.TXT.

    Another example is:

    C:\>REN *.DAT *.MST

    This changes the .DAT extension to .MST for matching files, subject to DOS filename rules.

     

    16. PROMPT Command

    The PROMPT command is used to customize the appearance of the DOS command prompt.

    Syntax:

    PROMPT [text]

    A commonly used prompt is:

    PROMPT $P$G

    Here:

    • $P displays the current drive and directory.
    • $G displays the > symbol.

    Example:

    C:\>PROMPT $P$G

    The prompt will then display the current drive and directory, followed by the > symbol.

    For example:

    C:\SAMS>

     

    17. TREE Command

    The TREE command displays the directory structure of a specified drive or directory in a graphical, tree-like format.

    Syntax:

    TREE [drive:][path] [/F]

    The /F switch displays the names of the files contained within each directory in addition to the directory structure.

    Example:

    C:\>TREE

    To display both directories and files:

    C:\>TREE /F

     

    Summary of Common Internal Commands

    Command

    Purpose

    VER

    Displays the DOS version

    VOL

    Displays the volume label and serial number

    DATE

    Displays or changes the system date

    TIME

    Displays or changes the system time

    CLS

    Clears the screen

    DIR

    Displays files and directories

    MD/MKDIR

    Creates a directory

    CD/CHDIR

    Changes the current directory

    PATH

    Defines the command search path

    RD

    Removes a directory

    COPY CON

    Creates a text file from the command prompt

    TYPE

    Displays the contents of a text file

    COPY

    Copies files

    DEL/ERASE

    Deletes files

    REN

    Renames files or directories

    PROMPT

    Customizes the DOS prompt

    TREE

    Displays the directory structure

    Note: The exact set of commands and available switches can vary between different DOS versions and command interpreters. Some commands commonly taught as DOS commands, such as TREE, may be implemented as separate executable utilities in particular DOS versions rather than being built into COMMAND.COM.

     

    External Commands of MS-DOS

    External commands are also known as disk-resident commands. Unlike internal commands, external commands are stored as separate program files on a hard disk, floppy disk, or other storage device. They are loaded into memory only when they are required for execution.

    Because they are not permanently stored in memory, external commands do not occupy memory continuously.

    Some commonly used external commands are:

    XCOPY, MOVE, FC, DOSKEY, MEM, ATTRIB, DELTREE, EDIT, and TREE.

     

    1. XCOPY Command

    The XCOPY command is an extended version of the COPY command. It can copy individual files as well as entire directories, subdirectories, and their files from one location to another.

    Syntax

    XCOPY source [destination] [/Y] [/-Y] [/P] [/E] [/S]

    Common Switches

    Switch

    Purpose

    /Y

    Overwrites existing files without prompting for confirmation.

    /-Y

    Prompts for confirmation before overwriting existing files.

    /P

    Prompts before copying each file.

    /E

    Copies all subdirectories, including empty directories.

    /S

    Copies subdirectories, but does not copy empty directories.

    Example

    C:\>XCOPY C:\SAMS D:\SAMS /S /E

    This copies the SAMS directory and its subdirectories and files to D:\SAMS, including empty directories.

     

    2. MOVE Command

    The MOVE command is used to move one or more files from one directory to another or from one disk to another. It can also be used to rename directories.

    Syntax

    MOVE [drive:][path]filename destination

    Common Switches

    Switch

    Purpose

    /Y

    Overwrites existing files without prompting.

    /-Y

    Prompts for confirmation before overwriting an existing file.

    Examples

    C:\>MOVE C:\SAMS\FO.TXT D:\

    This moves FO.TXT from the SAMS directory to drive D:.

    Another example:

    C:\>MOVE C:\SAMS\FO.TXT D:\NEW_SAMS

    This moves the file to the NEW_SAMS directory on drive D:.

     

    3. FC Command

    FC stands for File Compare. It is used to compare two files or two sets of files and display the differences between them.

    Syntax

    FC [switches] file1 file2

    Common Switches

    Switch

    Purpose

    /A

    Displays only the first and last lines of each group of differences.

    /B

    Compares files in binary mode, byte by byte.

    /C

    Ignores differences between uppercase and lowercase letters.

    /L

    Compares files in text mode.

    /N

    Displays line numbers for lines that differ.

    Example

    C:\>FC FIRST.TXT SECOND.TXT

    The command compares FIRST.TXT and SECOND.TXT and displays any differences.

     

    4. DOSKEY Command

    The DOSKEY command is a utility that allows DOS to remember previously entered commands. It also provides facilities for creating command macros.

    Without DOSKEY, DOS normally provides only limited command recall. When DOSKEY is loaded, previously entered commands can be recalled and executed without typing them again.

    Syntax

    DOSKEY

    After entering the command, DOSKEY is loaded into memory.

    Example

    C:\>DOSKEY

    DOSKEY can then maintain a command history list.

    Viewing Command History

    In supported DOS versions, the following command can be used to display the command history:

    C:\>DOSKEY /HISTORY

    or:

    C:\>DOSKEY /H

    The command history allows previously entered commands to be recalled and executed again.

    Recalling Commands

    Several keys can be used to recall commands stored by DOSKEY:

    Key

    Function

    Up Arrow

    Displays the previous command.

    Down Arrow

    Displays the next command in the history.

    Page Up

    Displays the oldest command available in the history.

    Page Down

    Displays the most recent command.

    F7

    Displays the command history list.

    F9

    Selects a command by its number from the history list.

    Alt + F7

    Clears the command history list.

    Alt + F10

    Deletes all macros from memory.

    Esc

    Clears the current command line.

    Ctrl + T

    Inserts a command separator in supported environments.

    DOSKEY Macros

    Another useful feature of DOSKEY is the ability to create macros. A macro allows a user to create a short command that represents a longer command.

    For example:

    C:\>DOSKEY C=CLS

    After creating this macro, typing:

    C:\>C

    will execute the CLS command and clear the screen.

     

    5. MEM Command

    The MEM command displays information about the computer's memory. Depending on the DOS version and available memory configuration, it can display information about conventional, expanded, and extended memory, as well as memory usage by programs.

    Syntax

    MEM [/F] [/P] [/M]

    Common Switches

    Switch

    Purpose

    /F

    Displays information about free memory.

    /P

    Displays the information one screen at a time.

    /M

    Displays information about how a specified program is using memory.

    Example

    C:\>MEM /P

     

    6. DOS Filters

    A useful feature of DOS is the ability to use filters to process data before sending it to an output device. A filter can modify, search, sort, or control the way data is displayed.

    Three commonly discussed DOS filters are:

    1. MORE
    2. SORT
    3. FIND

    These filters can be used with input and output redirection to process data from files or other commands.

     

    MORE Filter

    The MORE command is used to control vertical scrolling on the screen. It pauses the display after each screenful of information and displays a prompt such as:

    -- More --

    Pressing a key allows the next screen of information to be displayed.

    Example

    C:\>TYPE FILE.TXT | MORE

    Another example:

    C:\>DIR | MORE

    This displays the directory listing one screen at a time.

     

    SORT Filter

    The SORT command reads data, sorts it into an order, and sends the result to the screen, a file, or another device.

    Syntax

    SORT [/R] [/+n]

    Common Switches

    Switch

    Purpose

    /R

    Sorts the data in reverse order.

    /+n

    Begins comparison at column n.

    Examples

    C:\>SORT < NAME.TXT

    This sorts the contents of NAME.TXT.

    Another example:

    C:\>SORT /+20 < PHONE.TXT

    This begins sorting from column 20.

    Output Redirection

    The result of a SORT operation can be redirected to a file:

    C:\>SORT < NAME.DAT > SORTNAME.DAT

    Here:

    • < redirects input from NAME.DAT.
    • > redirects output to SORTNAME.DAT.

    Thus, the sorted result is stored in SORTNAME.DAT.

    Note: Traditional DOS versions have limitations on the amount of data that SORT can process.

     

    FIND Filter

    The FIND command is used to search files for a specified text string. It displays lines that contain—or, with the appropriate switch, do not contain—the specified string.

    The search string is enclosed in quotation marks.

    Syntax

    FIND [/V] [/C] [/N] [/I] "string" [filename]

    Common Switches

    Switch

    Purpose

    /V

    Displays lines that do not contain the specified string.

    /C

    Displays only the number of lines containing the string.

    /N

    Displays line numbers along with matching lines.

    /I

    Ignores differences between uppercase and lowercase letters.

    Examples

    C:\>FIND "RAJNI" MY.TXT PER.TXT

    This searches the specified files for the text string RAJNI.

    Another example:

    C:\>DIR | FIND "TXT"

    This displays directory entries containing the text TXT.

     

    7. ATTRIB Command

    Every file stored on a disk has information associated with it, such as its name, size, location, creation or modification date, and attributes.

    The ATTRIB command is used to display, set, or remove file attributes.

    The main DOS file attributes are:

    Attribute

    Meaning

    R

    Read-only

    A

    Archive

    H

    Hidden

    S

    System

    Syntax

    ATTRIB [+R|-R] [+A|-A] [+H|-H] [+S|-S] [filename]

    Attribute Options

    • +R – Sets the Read-only attribute.
    • -R – Removes the Read-only attribute.
    • +A – Sets the Archive attribute.
    • -A – Removes the Archive attribute.
    • +H – Sets the Hidden attribute.
    • -H – Removes the Hidden attribute.
    • +S – Sets the System attribute.
    • -S – Removes the System attribute.

    Examples

    C:\>ATTRIB MY.TXT +R

    This sets the Read-only attribute for MY.TXT.

    C:\>ATTRIB MY.TXT +H

    This sets the Hidden attribute for MY.TXT.

    To display the attributes of a file:

    C:\>ATTRIB MY.TXT

     

    8. DELTREE Command

    The DELTREE command is used to delete an entire directory, including its files, subdirectories, and hidden files.

    Syntax

    DELTREE [drive:][path]directory [/Y]

    The /Y switch suppresses the confirmation prompt.

    Example

    C:\>DELTREE SAMS

    This removes the SAMS directory and its contents.

    Important: DELTREE is a powerful command because it can remove an entire directory tree and its contents. It was available in MS-DOS and some versions of Windows but is not included in modern Windows command-line environments.

     

    9. EDIT Command

    The EDIT command starts the DOS text editor. It can be used to create and edit text files.

    Syntax

    EDIT [drive:][path][filename]

    Example

    C:\>EDIT C:\SAMS\FO.TXT

    This opens FO.TXT in the DOS Editor.

    To create a new file:

    C:\>EDIT NEWFILE.TXT

    The user can then enter and save text using the editor.

     

    10. TREE Command

    The TREE command displays the directory structure of a drive or directory in a tree-like format.

    Syntax

    TREE [drive:][path] [/F]

    The /F switch displays the names of files in each directory as well as the directory structure.

    Example

    C:\>TREE

    To display directories along with their files:

    C:\>TREE /F

     

    Batch Files in MS-DOS

    A batch file is a text file containing a sequence of DOS commands that are executed one after another. Batch files are useful for automating repetitive tasks.

    A batch file normally has the .BAT extension.

    For example, suppose a user performs the following four tasks every day:

    1. Display the directory contents.
    2. Copy ABC.TXT to another disk.
    3. Delete ABC.TXT from the current disk.
    4. Clear the screen.

    The commands might be:

    C:\>DIR

    C:\>COPY C:\ABC.TXT D:\

    C:\>DEL ABC.TXT

    C:\>CLS

    Instead of typing these commands separately every day, they can be stored in a batch file and executed together.

     

    Creating a Batch File

    One traditional method of creating a batch file in DOS is:

    C:\>COPY CON A.BAT

    Here:

    • CON refers to the console, which is normally the keyboard for input.
    • A is the name of the batch file.
    • .BAT is the required batch-file extension.

    After entering the command, type the DOS commands that should be executed:

    DIR

    COPY C:\ABC.TXT D:\

    DEL ABC.TXT

    CLS

    When finished, press Ctrl+Z or F6, followed by Enter, to save the file.

    DOS will display a message similar to:

    1 file(s) copied.

    The batch file A.BAT has now been created.

     

    Executing a Batch File

    To execute the batch file, simply type its name at the DOS prompt:

    C:\>A

    DOS automatically recognizes the .BAT extension and executes the commands stored in A.BAT sequentially.

    Thus, instead of entering several commands individually, the user can perform the entire sequence simply by typing:

    C:\>A

    Advantages of Batch Files

    Batch files are useful because they:

    • Automate repetitive tasks
    • Save time and effort
    • Execute commands in a specified sequence
    • Reduce the need to type the same commands repeatedly
    • Help simplify routine system-management operations

    In simple terms, a batch file is a collection of DOS commands stored in a file and executed automatically, one after another.

     

    Classification of MS-DOS Commands

    MS-DOS commands can broadly be classified into Internal Commands, External Commands, and Filter Commands. The following table summarizes their main characteristics and examples:

    Type of Command

    Description

    Stored In / Location

    When Loaded

    Examples

    Internal Commands

    Basic commands built into the DOS command interpreter and available directly at the command prompt.

    COMMAND.COM

    Loaded into memory during booting

    DIR, CD, MD, RD, COPY, DEL, REN, CLS, DATE, TIME, VER

    External Commands

    Special-purpose commands stored as separate program files and loaded only when required.

    Separate executable files on disk

    Loaded into memory when called

    XCOPY, MOVE, FC, MEM, ATTRIB, EDIT, DELTREE, TREE

    Filter Commands

    Commands that process, search, sort, or control data passed to them, often through pipes or redirection.

    Usually separate utility programs

    Loaded when executed

    MORE, SORT, FIND

    Batch Commands / Batch Files

    A sequence of DOS commands stored in a .BAT file and executed automatically in order.

    .BAT file on disk

    Loaded/executed when the batch file is called

    A.BAT, BACKUP.BAT, START.BAT

    Internal vs. External Commands

    Feature

    Internal Commands

    External Commands

    Meaning

    Built into the DOS command interpreter

    Stored as separate program files

    Storage

    Included in COMMAND.COM

    Stored separately on disk

    Memory

    Available after the command interpreter is loaded

    Loaded only when required

    Purpose

    Common, frequently used operations

    Specialized operations

    Dependency

    Do not require a separate executable file

    Require the corresponding program file

    Examples

    DIR, CD, COPY, DEL, CLS

    XCOPY, FC, MEM, EDIT, ATTRIB

    Examples by Category

    Internal Commands:
    VER, VOL, DATE, TIME, CLS, DIR, MD, CD, PATH, RD, COPY CON, TYPE, COPY, DEL, REN, PROMPT

    External Commands:
    XCOPY, MOVE, FC, DOSKEY, MEM, ATTRIB, DELTREE, EDIT, TREE

    Filter Commands:
    MORE, SORT, FIND

    Batch Files:
    Files with the .BAT extension that contain a sequence of DOS commands.

     

     

    Post a Comment

    0 Comments