中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 11:01
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Basic Usage Methods of DOS Operating System
Printable Version  55,730 / 196
Floor1 ko20010214 Posted 2003-06-01 00:00
版主 Posts 1,628 Credits 7,296
Sender: mmbbooyy (QQPETER), Board: DOS
Title: Basic Usage of the DOS Operating System
Posting site: BBS Shuimu Tsinghua Station (Sun Jul 15 18:15:14 2001)

/---------------------------------------------------------------------\
\---------------------------------------------------------------------/

    Section 1 Overview of the DOS Operating System


┏━━━━━━━━━━━┓
┃1.1 Development of the DOS Operating System ┃
┗━━━━━━━━━━━┛

  The DOS operating system is the Disk Operating System, abbreviated as DOS. The widely used MS-DOS was named by Microsoft after it bought the patent rights to DOS. PC-DOS was IBM's renamed version of MS-DOS after IBM selected MS-DOS as the basic operating system when launching the IBM-PC. There is not much essential difference between MS-DOS and PC-DOS, and their commands are basically compatible.
The predecessor of MS-DOS was 86-DOS, released by Seatlle Computer Products in 1980. Microsoft bought the patent for 86-DOS in 1981, then modified and expanded it and renamed it MS-DOS, namely MS-DOS V1.0. With the continuous development of microcomputer hardware and software, Microsoft also kept updating DOS versions. From DOS V1.0 released in 1981 to today, it has gone through more than ten versions; the latest version at present is MS-DOS V6.22. Table 1.1 lists the different versions of MS-DOS and their main technical improvements.

Table 1.1 MS-DOS versions and their main technologies
┏━━━┯━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃Version│ Release time │ Main technical improvements ┃
┠───┼──────┼──────────────────────────┨
┃1.0  │July 1981 │ ┃
┠───┼──────┼──────────────────────────┨
┃2.25 │1982 │Added double-sided floppy disks ┃
┠───┼──────┼──────────────────────────┨
┃2.0 │March 1983 │Hard disks, tree structure ┃
┠───┼──────┼──────────────────────────┨
┃3.0 │August 1984 │1.2M floppy disks, RAM disk, volume label and ATTRIB command  ┃
┠───┼──────┼──────────────────────────┨
┃3.1 │November 1984│Support for Microsoft network  ┃
┠───┼──────┼──────────────────────────┨
┃3.2 │1986 │Support for 3.5-inch disks  ┃
┠───┼──────┼──────────────────────────┨
┃3.3 │1987 │Support for 1.44M disks  ┃
┠───┼──────┼──────────────────────────┨
┃4.0 │December 1989│Added MS-DOS Shell, large-capacity files and disks  ┃
┠───┼──────┼──────────────────────────┨
┃5.0 │June 1991 │Memory management, task switching, EDIT, larger-capacity disks  ┃
┠───┼──────┼──────────────────────────┨
┃6.0 │April 1993 │Multiple machine configurations, disk compression and optimization, virus prevention, Windows support ┃
┃ │ │and portable computers, communications and networking, file backup, deletion and protection, ┃
┃ │ │online help, memory management, etc. ┃
┗━━━┷━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━┛


┏━━━━━━━━━━━━┓
┃1.2 Main Functions and Composition of DOS ┃
┗━━━━━━━━━━━━┛

The main functions of DOS include: file management, storage management, device management, job management, and CPU management.
(1) File management:
File management means orderly management of all kinds of files in the computer. This includes: management of file identifiers, attributes, creation or modification times; management of file read/write operations; and management of operations such as file creation, searching, comparison, modification, deletion, and copying.
(2) Storage management:
Storage management uses DOS's dynamic storage management to manage operations such as allocating, requesting, releasing, and modifying memory blocks. Storage management can make it convenient for system programs and applications to effectively use the current memory capacity.
(3) Device management:
Device management uses DOS's device management programs and modules to effectively manage peripheral allocation, peripheral input/output operations, and buffers.
(4) Job management:
A job is an independent task that the user requests the computer system to complete. A job may include several processing steps such as input, compiling, linking, running, and output. Job management is the necessary resource scheduling and job processing control when many jobs are executed.
(5) CPU management:
The CPU is an important resource in a microcomputer system. CPU management is, first, to enable the CPU to operate efficiently, and second, to handle all possible interrupt events.
(6) Composition of DOS:
The main body of MS-DOS uses a hierarchical modular structure, consisting of a boot loader and three hierarchical modules, as shown in Figure 1 below.

┌────┐  ┌──────┐
 │User ├─→│Keyboard Command │
└─┬──┘  └──┬───┘
   │   ┌┈┈┈┈┼┈┈┈┈┈┈┐
   │   ┊    ↓      ┊
   │   ┊ ┌──────┐  ┊
   │   ┊ │COMMAND.COM │ ┊
│ ┊ └──┬───┘ ┊
↓ ┊ ↓ ┊
┌────┐┊ ┌──────┐ ┊
│User Program├┼→│ MSDOS.SYS │ ┊
└────┘┊ └──┬───┘ ┊
┌┈┈┈┈┈┈┘ ↓ ┊DOS
┊┌────┐ ┌──────┐ ┊
┊│Boot loader│  │ IO.SYS │ ┊
┊└─┬──┘ └──┬───┘ ┊
└┈┈┼┈┈┈┈┈┈┈┈┼┈┈┈┈┈┈┘
│ ↓
│ ┌──────┐
└────→│ ROM BIOS │
└──────┘
Figure 1 DOS composition structure


①Boot loader (Boot record)
The boot loader is stored on side 0, track 0, sector 1 of the disk (the boot sector). When DOS starts, through the bootstrap program in the basic input/output system (ROM BIOS) stored in read-only memory, the boot loader is first loaded into memory, and then it loads the rest of DOS from the disk into memory.

②Input/output interface program (IO.SYS)
The input/output interface program is the lowest-level DOS module and is the interface between MSDOS.SYS and ROM BIOS. It includes all DOS function call modules and can perform operations on peripherals such as the display, keyboard, printer, communications port, clock, and counter. At the same time, when DOS starts, IO.SYS is also responsible for checking the devices connected to the computer system and setting up the devices that will be used, to ensure normal use when the system is running.

③File management and system call program (MSDOS.SYS)
This program is the core DOS module, including DOS internal command execution modules for file management, disk management, and other peripheral management. When DOS starts, MSDOS.SYS is loaded into memory and remains resident, responsible for initialization of internal work tables and file assembly tables, accepting calls to various DOS internal commands, etc.

④Keyboard command management program (COMMAND.COM)
The keyboard command management program is the interface between the user and DOS, stored on disk under the command filename COMMAND.COM. Its function is to accept commands typed by the user and analyze them. According to the command type (internal command or external command), it uses the corresponding processing program to interpret and execute it, and outputs the execution result on the display. If the command typed by the user is wrong, an error message is displayed.


┏━━━━━━━┓
┃1.3 Starting DOS ┃
┗━━━━━━━┛

(1) DOS startup methods
DOS startup includes two methods: cold boot and warm boot.

①Cold boot refers to starting the system by powering it on. The cold boot operation method is:
Boot from drive A (floppy disk)
a. Insert the floppy disk containing the DOS system into drive A and close the drive latch;
b. Turn on the display, printer (if any), and host power in sequence, and DOS startup begins.
Boot from drive C (hard disk)
a. Open the latch of drive A;
b. Turn on the display, printer, and host power in sequence.

②Warm boot is a DOS startup method used when the computer is running abnormally, has crashed, or after changing system parameter settings. The warm boot method is:
Press the Ctrl key, Alt key, and Del key at the same time.

(2) System initialization
After completing the DOS startup operation, the microcomputer system automatically enters system initialization. The main work of system initialization includes:
①Hardware device detection, including CPU chip detection, detection of other main chips (such as interrupt controller, DMA controller, etc.), ROM BIOS chip detection, memory chip detection, keyboard detection, display detection, disk device detection, and printer and serial port addresses, etc. In warm boot mode, the memory chips are not detected.
②Execute the bootstrap program in ROM BIOS to load the boot loader from disk into memory.
③Execute the boot loader to load the three DOS modules into memory and execute them.
④Find and execute CONFIG.SYS (system configuration program) and AUTOEXEC.BAT (batch file).
When A:\> (floppy boot) or C:\> (hard disk boot) appears on the display, it means DOS startup and system initialization are complete, and DOS commands can be accepted.



Section 2 Files and File Management

In a broad sense, a file is a collection of related information stored on a certain medium. In computers, a file generally specifically refers to a collection of related information stored on a storage medium. That is, a file may be various programs, data, text, graphics, and audio-video materials stored on cards, tapes, disks, CDs, etc.
Since the files we usually use most are disk files, we must deeply understand disk files and their management.

┏━━━━━━━━━┓
┃2.1 Files and File Directories┃
┗━━━━━━━━━┛

(1) Files
To use files and disks reasonably, you need to understand some of the DOS system's rules for file management.

①File name (File Name)
The DOS system stipulates: a file's filename consists of two parts: the main filename and the extension filename.
Filename naming rules:
a. The main filename consists of 1 to 8 legal characters; the extension filename consists of 1 to 3 legal characters.
b. The following DOS reserved characters cannot be used as filename characters:
* file wildcard , parallel parameter separator
? file wildcard . extension prefix
> operation redirection : disk designator

For example, the following filenames are legal:
COMMAND.COM AUTO.BAT LXX.DOC
The following filenames are illegal:
ABC/XY.BAS illegal character in the main filename
SAYON.EXEC extension exceeds three characters
.SYS no main filename

②File types
The main filename indicates the job or function of the file to the user. The extension is the mark of the file type and is usually given by the system. Common extension types include:
Executable files: .EXE (executable file) .COM (command file) .BAT (batch file)
Text files: .TXT (text file) .DOC (document file) .DAT (data file)
Source program files: .BAS (BASIC) .PAS (PASCAL) .C (C language)
.PRG (DBASE/FOX) .ASM (assembly)
Other files: .SYS (system file) .OVL (overlay file) .BAK (backup file)

③File wildcards
The DOS system provides two file wildcards, “*” and “?”, both of which can be used in the main filename or extension filename.
“*” represents any number of characters starting from that character, and “?” represents one character at that character position. For example:
*.* all files
A*.TXT all files whose main filename begins with A and whose extension is TXT
ABA?.* all files whose main filename begins with ABA and has no more than four characters
?A*.* all files whose second character in the main filename is A (including any extension and files without an extension)
In DOS file operation commands, some commands do not allow file wildcards (such as the TYPE command), and some commands may cause confusion if wildcards are used (such as the RENAME command). Special attention must be paid when using them.

④File attributes
In addition to a filename and file type, a file also has file attributes. File attributes include four types: System, ReadOnly, Hidden, and Archive. Their attribute characteristics are:
System attribute (S) indicates that the file is a DOS system file;
Read-only attribute (R) indicates that the file can only be read, and cannot be modified or deleted;
Hidden attribute (H) indicates that the filename is not displayed by ordinary display commands;
Archive attribute (A) indicates that the file has been modified since the last backup.
File attributes can be displayed or set through the DOS ATTRIB command.

(2) File directory
A file directory is similar to the chapter and section table of contents of a book; it is a directory showing a group of files. A disk has a relatively large capacity and can store many file directories. DOS organizes and manages disk files through file directories.
In a file directory, a directory entry is set up for each file, including information such as filename, length, creation or modification date and time, file attributes, and the starting address of the storage location.

(3) Directory structure
DOS file directories use a tree structure.
The tree directory structure is like an inverted tree. The root node in the tree is the root directory. From the root downward, each branch node is a subdirectory, and each leaf node is a file, as shown in Figure 2.

┌────┐
│Root directory\ │
└─┬──┘
┌───────┬───┴────┬───────┬─────┐
↓ ↓ ↓ ↓ ↓
┌────┐ ┌─────┐ ┌────┐ ┌──────┐ ┌──┐
│ BASIC │ │CONFIG.SYS│ │WINWORD │ │COMMAND.COM │ │DOS │
└─┬──┘ └─────┘ └─┬──┘ └──────┘ └┬─┘
├───────┐ ┌──┴──┐ ┌────┴┐
↓ ↓ ↓ ↓ ↓ ↓
┌─────┐┌─────┐┌────┐┌────┐┌────┐┌──┐
│BASIC.EXE ││BASIC.BAS ││TEMPLATE││LETTERS ││ANSI.SYS││VDIF│
└─────┘└─────┘└─┬──┘└─┬──┘└────┘└┬─┘
↓ ↓ ↓
┌─────┐┌──────┐ ┌─────┐
│NORMAL.DOT││OTHER10.DOT │ │ACER10.DOT│
└─────┘└──────┘ └─────┘
Figure 2 Schematic diagram of tree directory structure

In the figure, BASIC, WINWORD, DOS, TEMPLATE, LETTERS, and VDIF are all branch nodes, that is, subdirectories; CONFIG.SYS, COMMAND.COM, BASIC.EXE, ANSI.SYS, NORMAL.DOT, OTHER10.DOT, and ACER10.VDB are all leaf nodes, that is, files.

The characteristics of the tree directory structure are:
①In multi-level directories, multiple files with the same name are allowed as long as they are in different directories;
②A disk has only one root directory. The root directory has no directory name and is generally represented by “\”. For example: C:\> indicates the root directory of drive C;
③Subdirectory naming rules are the same as filename rules, but subdirectory names generally do not use extensions. A subdirectory name cannot duplicate a file name at the same level;
④Each subdirectory has two special file directory entries: the first is “.”, containing directory information about the subdirectory itself; the second is “..”, containing information about the parent directory. These two directory entries are automatically created when the subdirectory is created.

(4) Current disk and current directory
The “current” disk and “current” directory are the system's default operating objects. If the user does not explicitly specify the operating object, the system operates on the “current” object.
Generally, after DOS starts, it automatically takes the boot disk and that disk's root directory as the system's default operating objects, namely the current disk and current directory. For example: after booting from the hard disk, the screen displays C:\>, indicating that drive C is the current disk and the root directory of drive C is the current directory.
Each disk has its own current directory. If a disk directory contains multiple subdirectories, there will be multiple current directories. For a disk operated on for the first time, its current directory is the root directory.


┏━━━━┓
┃2.2 Path┃
┗━━━━┛

(1) Path
A path (PATH) refers to the combination of channels passed through from the root directory or current directory to the directory where the object to be accessed (file or directory) is located.
There are two kinds of paths: absolute paths and relative paths:
An absolute path is expressed by a group of subdirectory names passed through from the root directory to the specified file (or directory), and must begin with “\”. That is:
\subdirectory name 1\subdirectory name 2\……
For example:
┌┈┈┈┐ ┌┈┈┈┈┈┈┈┈┐
┊ C:\> ┊DIR┊\LXX ┊
┊ C:\> ┊DIR┊\LXX\USER ┊
┊ C:\> ┊DIR┊\LXX\USER\READ ┊
└┈┬┈┘ └┈┈┈┬┈┈┈┈┘
↓        ↓
Current directory (root directory) Absolute path

A relative path is expressed by a group of subdirectory names passed through from the current directory to the specified file (or directory). That is:
subdirectory name 1\subdirectory name 2\……
For example:
┌┈┈┈┈┈┈┈┈┈┐ ┌┈┈┈┈┈┐
┊C:\LXX> ┊DIR┊USER\READ ┊
┊C:\LXX\USER> ┊DIR┊READ\HZK ┊
┊C:\LXX\USER\READ> ┊DIR┊HT ┊
└┈┈┈┈┬┈┈┈┈┘ └┈┈┬┈┈┘
↓ ↓
Current directory Relative directory

(2) File identification
Since the tree file directory structure used by DOS allows multiple files with the same name to exist in different subdirectories, when using it, the file identification must be used to determine which file is to be operated on.
A file identification consists of three parts: drive letter, path, and filename, namely:

In this, “:” indicates the disk where the file is stored, which can be A:, B:, C:, D:, …… respectively indicating drive A, drive B, drive C, drive D, etc. If it is the current drive, it can be omitted; it can be represented by an absolute path or a relative path.

----------------------------------------------



Floor2 ko20010214 Posted 2003-06-01 00:00
版主 Posts 1,628 Credits 7,296

Section 3 Basic Use of DOS Commands



The DOS system itself includes dozens of commands, but for beginners, they should first master the functions and usage of the most commonly used ones. As one’s own knowledge accumulates and one’s level of use improves, the other commands can be naturally mastered.

┏━━━━━━━━┓
┃3.1 Overview of DOS Commands ┃
┗━━━━━━━━┛

(1) Internal commands and external commands
DOS commands can be divided into two main categories: internal commands and external commands:
①Internal commands are processing commands resident in memory. After DOS starts, this type of command can be used at any time.
②External commands are programs stored on disk in the form of independent files. Each external command corresponds to an executable file. When an external command is executed, DOS loads the program that processes the command into memory and then executes it. To use an external command, the drive letter and path should be specified. All files with the extensions .COM, .EXE, and .BAT can be regarded as external commands.

(2) DOS command format
DOS commands have a certain command format, generally:
...
In it, the command word indicates the operation task, switch parameters specify the operation details, and "" indicates optional items.
DOS stipulates: the characters in one command line cannot exceed 127; the command word, file identifier, and switch parameters must be separated by spaces; switch parameters use "/" as the leading symbol, and the order of switch parameters does not affect the command execution result; press Enter to end command input.
For convenience of explanation, in the command examples below, "↙" represents the Enter key.


┏━━━━━━━━┓
┃3.2 File Operation Commands┃
┗━━━━━━━━┛

As the name implies, file operation commands are commands used to operate on files.
Basic file commands include commands for viewing file contents, copying files, deleting files, and renaming files.

(1) File content viewing command
①Format: TYPE filename
Here indicates the drive letter, indicates the path, filename indicates the primary file name, and indicates the extension.
②Function description: The TYPE command is an internal command, used to display or print the contents of a specified file. If you want to print, you must first press Ctrl + PrintScreen at the same time to connect the printer; the TYPE command does not allow wildcards.
The TYPE command can only display readable ASCII files such as text files (.TXT), batch files (.BAT), and source program files, and cannot display binary code files (such as .COM or .EXE).
For example: C:\>TYPE AUTOEXEC.BAT
The contents of the AUTOEXEC.BAT file will be output on the screen (or printer).

(2) File copy command
①Format:
a. COPY
b. COPY ++...+
②Function description: The COPY command is an internal command; wildcards are allowed; the first command format can copy one or more files, and the target file and source file may have the same name (in different directories), or may have different names; the second command format can merge multiple files into one file, and after merging, the file is the same as the first file.
For example
C:\>COPY AUTOEXEC.BAT AUTO.BAK ; Copy the file to the same directory, changing the file name to AUTO.BAK.
C:\>COPY AUTOEXEC.BAT \LXX ; Copy the file to the LXX subdirectory, with the file name unchanged.
C:\>COPY AUTOEXEC.BAT A:\DOS ; Copy the file to the DOS subdirectory on drive A, with the file name unchanged.
C:\>COPY *.* A: ; Copy all files in the root directory of drive C to drive A.
C:\>COPY L1.DAT+L2.DAT+L3.DAT ; Merge the three files into one, with the file name L1.DAT.

(3) File delete command
①Format: DEL(or ERASER)
②Function description: The DEL command is an internal command; wildcards are allowed; the DEL command can delete one or more specified files, but cannot delete subdirectories.
For example:
C:\>DEL AUTO.BAT ; Delete the file named AUTO.BAT in the root directory of drive C.
C:\>DEL \LXX\AUTO.BAT ; Delete the file named AUTO.BAT in the LXX subdirectory of drive C.
C:\>DEL A:\*.BAS ; Delete all files with the BAS extension in the root directory of drive A.
If the wildcard *.* is used to delete all files in a specified directory, to prevent mistaken deletion, the DOS system will display a prompt:
Are you sure(Y/N)?_
letting the user confirm. Enter Y and press Enter, and all files in the specified directory will be deleted; otherwise the deletion operation is canceled.
You must be very careful when using DEL *.*; under normal circumstances, do not use this command on the root directory of drive C.

(4) File rename command
①Format: REN
②Function description: The REN command is an internal command; wildcards are allowed; the REN command can change the names of one or more files.
For example:
C:\>REN AUTO.BAT AUTOEXEC.BAK ; Rename the AUTO.BAT file to AUTOEXEC.BAK.
C:\>REN A:\LXX\*.TXT *.DOC ; Change all files with the TXT extension in the LXX subdirectory on drive A so that the primary file name remains unchanged and the extension becomes DOC.
Under normal circumstances, try to avoid using wildcards in the REN command. If wildcards are used improperly, it can cause confusion in file names.


┏━━━━━━━━┓
┃3.3 Directory Operation Commands┃
┗━━━━━━━━┛

Directory operation commands are commands for operating on directories. They include basic commands such as directory display, creating subdirectories, changing the current directory, and deleting subdirectories.

(1) Directory display command
①Format: DIR
②Function description: The DIR command is an internal command; wildcards are allowed; the DIR command is used to display (or print) the directory listing of a specified directory. If part of it is omitted, the system defaults to the current directory; commonly used switch parameters are:
/W : display in multiple columns on one line, and show only file names and subdirectory names;
/P : display the directory listing one screen at a time. When the file entries fill one screen, it pauses, and pressing any key continues the display;
/S : display the file directories including all lower-level subdirectories;
/A : display files and directories with specified attributes, including hidden files and system files.
For example:
C:\>DIR ; Display all file and subdirectory names in the root directory of drive C.
C:\>DIR A:\LXX /W ; Display all file names in the LXX subdirectory on drive A in multiple columns.
C:\>DIR \DOS\*.EXE /P ; Display all file names with the EXE extension in the DOS subdirectory of drive C one screen at a time.

(2) Create subdirectory command
①Format: MD
②Function description: The MD command is an internal command; it is used to create a subdirectory under a specified directory; the name of the new subdirectory cannot be the same as an existing subdirectory name or primary file name in the same-level directory; if the drive letter and path are omitted in the MD command, it means creating the subdirectory under the current directory.
For example:
C:\>MD USER ; Create a new subdirectory named USER under the root directory of drive C.
C:\>MD \USER\LXX ; Create a new subdirectory named LXX under the USER subdirectory of drive C.
C:\>MD A:\USE ; Create a new subdirectory named USER under the root directory of drive A.

(3) Delete subdirectory command
①Format: RD
②Function description: The RD command is an internal command, used to delete a specified subdirectory; the RD command cannot delete the current directory or the root directory; the subdirectory to be deleted must be an empty directory (that is, the subdirectory contains only the two file markers "." and "..").
For example:
C:\>RD USER ; Delete the subdirectory named USER under the root directory of drive C.
C:\>RD \USER\LXX ; Delete the subdirectory named LXX under the USER subdirectory of drive C.
C:\>RD A:\USE ; Delete the subdirectory named USER under the root directory of drive A.
DOS commands also provide a command for deleting subdirectories:
DELTREE
This command can directly delete the specified subdirectory, including all files and subdirectories in it. Since this command deletes a large number of files, it must be used with caution.

(4) Change current directory command
①Format: CD
②Function description: The CD command is an internal command, used to change and display the current directory.
For example: drive C has the directory structure C:\USER\LXX\HZK, where USER, LXX, and HZK are all subdirectory names. Then:
Current directory and display Command Current directory display after change
C:\> CD USER C:\USER>
C:\> CD USER\LXX\HZK C:\USER\LXX\HZK>
C:\USER\LXX\HZK> CD.. C:\USER\LXX>
C:\USER\LXX\HZK> CD\ C:\>
C:\USER\LXX\HZK> CD A:\DOS A:\DOS>


┏━━━━━━━━┓
┃3.4 Disk Operation Commands┃
┗━━━━━━━━┛

The objects operated on by disk operation commands are floppy disks and hard disks, including basic commands such as disk formatting, disk copying, disk checking, system file copying, and disk directory structure display.

(1) Disk format command
①Format: FORMAT ……
②Function description: The FORMAT command is an external command, used to format a specified disk; commonly used switch parameters are:
/S: after the disk is formatted, copy the three DOS system files to the formatted disk, so that the disk can boot DOS;
/F: specify the capacity of the disk to be formatted. It can be 360K, 640K, 720K, 1200K, 1440K, or 1.2M, 1.44M, etc.;
/V: specify a volume label name for the disk (composed of 1 to 11 characters);
/Q: quickly format the disk, only deleting the original file allocation table and root directory contents on the formatted disk, without checking disk defects.
For example: to format a new floppy disk in drive A, the operating procedure is:
a.Enter the command FORMAT A:↙
The screen displays:
Insert new diskette for drive A:
and press Enter when ready...
b.Insert the new disk into drive A, close the drive latch, and press Enter. The system begins formatting the floppy disk.
When formatting is completed, the screen displays:
Volume Label (11 Characters, Enter for None)?
The system prompts the user to enter a volume label name; if no volume label is to be set, just press Enter directly. The screen will display the disk capacity information after formatting, and show:
Format another(Y/N)?
If the user wants to format another floppy disk, enter Y; otherwise enter N to end the formatting operation.
If you want to format another floppy disk in drive A named LXX that can be used as a system disk, you can use the command:
FORMAT A:/S/V:LXX
Since the FORMAT command can not only format new disks, but can also format disks that have already been used, before formatting an old disk you must confirm that all information on the disk is no longer needed, otherwise it may cause irretrievable loss. Under normal circumstances, do not format a hard disk.

(2) Disk copy command
①Format: DISKCOPY
②Function description: The DISKCOPY command is an external command, used to copy the contents of a specified disk to another disk; d1 indicates the source disk, d2 indicates the target disk; /1 means to copy only one side of the source disk to the target disk, /V means to verify the consistency of the target disk and source disk information while copying; the specifications of the source disk and target disk must be the same; when d1 and d2 are the same, it means performing disk copying on the same drive; if the target disk is unformatted, it will be automatically formatted during the copying process.
For example: to copy all contents on drive A to drive B, enter the command:
DISKCOPY A: B:↙
The screen displays:
Insert Source diskette for drive A:
Insert Target diskette for drive B:
prompting the user to insert the source disk and target disk into drives A and B respectively, then press Enter. The system begins copying. After copying is finished, the screen displays:
Copy press ended
Copy another diskette (Y/N)?
If the user wants to continue copying other floppy disks, enter Y; otherwise enter N to end the copy operation.
It is also possible to copy disks on the same drive. For example, to copy a disk on drive A, enter the command:
DISKCOPY A: A:↙
The system will prompt the user when to insert the source disk and target disk, until the copying operation is completed.
On the surface, the disk copy command DISKCOPY and the file copy command COPY *.* can both copy the contents of one disk to another disk, but in fact there are many differences between the two commands, as shown in Table 3.1.

Table 3.1 Comparison between the DISKCOPY command and the COPY *.* command
┏━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┓
┃            │  DISKCOPY A: B:  │  COPY A:\*.* B: ┃
┠────────────┼───────────┼──────────┨
┃Copy system and hidden files│     Yes  │ No ┃
┠────────────┼───────────┼──────────┨
┃ Single-drive operation │ Yes │ No ┃
┠────────────┼───────────┼──────────┨
┃Copy to a formatted disk │ Yes │ No ┃
┠────────────┼───────────┼──────────┨
┃ Defragment files │ No │ Yes ┃
┗━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┛

(3) Disk check command
①Format: SCANDISK
②Function description: SCANDISK is an external command provided by advanced versions of DOS. It can check the magnetic medium, file allocation table, directory structure, and file storage status of a specified disk, and can also scan the disk surface structure. During the checking process, it uses a graphical interface to indicate the check status and check results.
For example: enter the command
SCANDISK A:↙
The system will check the magnetic medium, file allocation table, directory structure, file storage status, etc. of the disk in drive A, and display the check results graphically. It then prompts the user whether to perform a disk surface structure scan; if the user agrees to scan, the system will start the scanning operation and graphically display the disk surface structure and scanning progress. During execution of the disk check command, you can press the "X" key at any time to abort the operation or exit the SCANDISK command.

(4) System file copy command
①Format: SYS :
②Function description: SYS is an external command, used to copy the three system files required when DOS starts, IO.SYS, MSDOS.SYS, and COMMAND.COM) to a specified disk, making that disk a system disk that can boot DOS; d1 and the path indicate the location of the system files, and if omitted, it means the system files are in the root directory of the current disk; d2 indicates the target disk to which the system files are copied.
For example:
C:\>SYS A: ;Copy the three system files from drive C to drive A, making it a system disk.
C:\>SYS A: B: ;Copy the three system files from drive A to drive B, making it a system disk.

(5) Disk directory structure display command
①Format: TREE
②Function description: TREE is an external command, used to display the directory structure of a specified disk; /F means also displaying all files in directories at all levels.
For example:
C:\>TREE A: ;Display the root directory structure of drive A.
C:\>TREE \USER ;Display the structure of the USER subdirectory.
C:\>TREE A: /F ;Display the root directory structure of drive A and all file names in directories at all levels.


┏━━━━━━━━━━┓
┃3.5 System Environment Setting Commands┃
┗━━━━━━━━━━┛

System environment setting commands are generally internal commands.
(1) Clear screen command
①Format: CLS
②Function description: The CLS command is used to clear the screen and position the system prompt and cursor at the upper left corner of the screen.
For example:
C:\>CLS↙
All original contents on the screen disappear, and only "C:\>" is displayed in the upper left corner of the screen.

(2) Date setting command
①Format: DATE
②Function description: The DATE command is used to display and reset the system date; mm indicates month, dd indicates day, yy indicates year (with the first two digits omitted), separated by the symbol "-".
For example: C:\>DATE↙
The screen displays the current system date as:
Current date is 11-18-97
Enter new date(mm-dd-yy):_
prompting the user to enter a new date. If the date is not to be changed, just press Enter directly.

(3) Time setting command
①Format: TIME
②Function description: The TIME command is used to display and reset the system time; hh indicates hours (0-23), mm indicates minutes (0-59), ss indicates seconds (0-59), separated by the symbol ":".
For example: C:\>TIME↙
The screen displays the current system time as:
Current time is 10:05:48p
Enter new time:_
prompting the user to enter a new time. If the time is not to be changed, just press Enter directly.

(4) Display DOS version number command
①Format: VER
②Function description: The VER command is used to display the DOS version number currently in use.
For example: C:\>VER
The screen displays:
MS-DOS Version 6.22
Here 6 indicates the major version number, and 22 indicates the minor version number.


(End)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^
All rights to the original work of this book belong to: "Computer Basic Applications" Editorial Group
(Central Radio and Television University Press)
This book has been slightly modified from the original work; layout copyright belongs to: QQ-PETER

※ Modified:·mmbbooyy modified this post on Jul 21 15:23:20·
※ Source:·BBS Shuimu Tsinghua Station smth.org·

(This article was copied using the S-Term article copy script)
==================================================






Floor3 快乐BOY Posted 2003-06-03 00:00
初级用户 Posts 1 Credits 105
Boss, can you talk about something more advanced? Everyone knows these! Please talk about batch files
Floor4 amingshao Posted 2003-06-11 00:00
初级用户 Posts 7 Credits 131
Dizzy, since you already understand it, then don’t stay here. This is basic DOS usage, and it is very important to us newbies.
Floor5 慕白 Posted 2003-06-11 00:00
高级用户 Posts 115 Credits 617
Moderator boss, can you redo the layout? Looking at it makes my head spin~~~~~~~~
Floor6 MYS Posted 2003-06-11 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
Everyone download CCED2000 and paste it in for layout formatting.
Floor7 qhch1979 Posted 2003-07-02 00:00
初级用户 Posts 9 Credits 137
I think it would be better to post something more meaningful. Really, for us DOS enthusiasts, who doesn’t know the basic commands? More substantial things are better than always “reheating cold leftovers”!
Floor8 ko20010214 Posted 2003-07-04 00:00
版主 Posts 1,628 Credits 7,296
The following is quoted from the post by qhch1979 on 2003-7-2 23:27:24:
I think it would be better to post something more meaningful. Really, for us DOS enthusiasts, who doesn’t know the basic commands? More substantial things are better than always “reheating cold leftovers”!

Boss, go take a look, how many problems are caused because people don’t even know the most basic things?
They’re all over the forum. faint~~
I hope beginners can first read posts with this kind of basic knowledge, and post fewer overly elementary questions.
Also, if DOS enthusiasts like you already know all the basic commands, could you also share your knowledge with beginners? I would be very happy to see you replying to some questions raised by beginners. I know you have the ability to answer; it just depends on whether you are willing to answer.
Floor9 bqjhl Posted 2003-07-07 00:00
初级用户 Posts 5 Credits 122
I support my good moderator. ^_^
Floor10 xp2002_xp Posted 2003-07-07 00:00
初级用户 Posts 17 Credits 157
Thank you, moderator!
Please post more systematic materials like this in the future.
It is very important to us newbies.

Please continue
Floor11 kjlulu Posted 2003-07-08 00:00
初级用户 Posts 5 Credits 122
Thank you, moderator! Please continue!
Floor12  Posted 2003-07-10 00:00
初级用户 Posts 8 Credits 137
Bump!! This is best for us beginners
Thanks!!!!!
Floor13 zenger Posted 2003-07-12 00:00
初级用户 Posts 3 Credits 133
Floor14 sade Posted 2003-07-23 00:00
初级用户 Posts 2 Credits 114
I don’t know it. Thanks
Floor15 leslie Posted 2003-07-26 00:00
初级用户 Posts 16 Credits 178
1 2 3 414  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023