DOS: Disk Operate System, Disk Operating System, DOS Commands Also divided into internal commands and external commands. The internal command is also called a station command, which is loaded into the memory while the startup of the DOS system is loaded. That is, as long as the DOS system is activated, we can use internal commands. The external command is an executable file stored on the disk, and the external command needs to be transferred from the disk to the memory, so the external command can only be used when the file exists. Files with .com, .exe, .bat, etc., can be seen as an external command. Common internal commands have MD, CD, RD, Dir, Path, Copy, Type, Edit, Ren, Del, CLS, Ver, Date, Time, Prompt. Common external commands have Deltree, Format, Diskcopy, Label, Vol, Sys, XCopy, FC, Attrib, MEM, TREE. Common internal commands detailed 1. MD - Create a subdirectory function: Create a new subdirectory ü type: internal command ü format: MD [disk] [path name] Üfor 1: c: /> md y / * --- Establish a Y subdirectory --- * / 2. CD - Change the current directory function: Display current directory u type: internal command ÜÜ format: CD [disk] [pathname] [sub-directory name] Description: The CD command cannot change the current disk, CD .. Return to The last directory, the CD / representation returns to the current disk directory, and the current directory name is displayed when the CD does not parameter. For 2: C: /> CD Y / * --- Displays the current directory y --- * / 3. RD - Delete subdirectory command ü function: Deleted a directory from the specified disk. Type: Internal Command ü Format: RD [Distribution:] [Path Name] [Subnatal Name] Üfor 3: C: /> RD Y4. DIR - Display Disk Directory Command Features: Displays the contents of the disk directory. ü Type: Internal Command ü Format: Dirü [Drive] [Path] [/ P] [/ w] for 4: C: /> DIR Y5. Path - Path Settings Command ü Features: The search path of the device executable file is only valid for the file. Type: Internal Command ÜÜ Format: Path [Cause 1] Directory [Path Name 1] {[; Disk 2:], ...} for 5: C: /> PathPath = C: / Windows; C: / windows / command; c: / programfiles / mts6. Copy file copy command ü Features: Copy one or more files to the specified disk. Type: Internal Command ü Format: COPYÜ [Source Disk] [Path]
ÜÜ Format: TYPE [Path] [Path] for 7: C: /> Trpe YYY.TXT / * - Hypothesis The YYY.TXT file exists in the C directory --- * / 8. Edit - Edit File Content Commands 1. Function: Edit the contents of the ASCII file, you can also create a new file. 2. Type: Internal command. 3. Edit [Disk] [Path] Description: Edit can edit the content of the ASCII file, or create a file, their extension naming method is also flexible, such as .txt, .bat, You can even edit .c, .rable format. For 8_1: c: /> edit / * Enter Edit Mode * / for 8_2: C: /> Edit YYY.TXT / * --- Edit YYY.TXT file content, if you want to select support Chinese format, you should install UCDOS- --*/9. REN - file rename command ü function: Change file name type: internal command ü format: REN [drive] [path] Üfor 9: c: c: c: /> ren yyy.txt clely .txt10. DEL - Remove the file command function: Delete the specified file. ü Type: Internal Command ÜÜ Format: DEL [Disk] [Path] [/ P] Description: Select / P Parameters, the system is inquiry before deleting whether the file is really deleted, if this parameter is not used, It is automatically deleted. 11. CLS - Clear Screen Command ü Features: Clear all the display on the screen, the cursor is placed on the upper left corner of the screen. Type: Internal Command ü Format: CLSÜFOR 11: C: /> CLS12. VER View System Version Number Command Function: Display Current System Version Number ü Type: Internal Command üü format: Verfor 12: C: /> Verwindows 98 [Version 4.10.2222] / * --- Current System version number --- * / 13. DATA Date Settings Command Features: Setting or Display System Date. ü Type: Internal Command ÜÜ Format: Date [MM-DD-YY] for 13: C: /> DATECURRENT DATE IS Sun 11-23-2Enter New Date (mm-dd-yy): / * New Date --- * / 14. TIME System Clock Settings Command Features: Setting or display the system period. ü Type: Internal Command ÜÜ Format: Time [HH: MM: SS: XX] for 14: C: /> TimeCurrent Time IS 22: 49: 28.81enter New Time: 15. Prompt: Change Command Prompt ü function: Change the style of the DOS system prompt.
Type: Internal Command ü Format: Prompt [Text] ü Description: Text Specifies the new command prompt, the prompt can be constructed of normal characters and the following specific code, $ A & (AmPersand) $ B (pipe) $ C Left projection) $ d Current date $ E Escape code (ASCII code 27) $ f) (Right proprogram) $ g> (larger than symbol) $ h Back (除 Previous character) $ l <(less than symbol) $ n Currently drive $ P current drive and path $ Q = (equal sign) $ S (space) $ T current time $ V Windows 2000 version number $ _ wrap $$ $ (currency symbol) FOR 15: C: /> promptC> common External command details 1. Deltree - Delete the entire directory command ü function: Delete the entire directory and its sub-directory and file. Type: External Command ü Format: Deltree [Disk] üfor 1: C: /> DELTREE YYYDELETE DIRECTORY "YYY" and all its subdirectories? [Yn] 2. Format - Disk Format Command ü function: Format, divide the tracks and sectors on the disk; at the same time check that there is a magnetrop on the entire disk, the bad track is marked; establish a directory area and file allocation table, Enable the disk to receive DOS preparation. ü Type: External Command Format: Format [/ q] [/ s] [/ autotest] Üfor 2.:CaoFormat D: / q / s / autoteschecking existing disk fo3. DiskCopy - Over Copy Command ü Features: Copy format and floppy disk of content. Type: External Command ü Format: Diskcopy [Disk 1:] [Disk 2:] Üfor 3: C: C: /> DiskCopy A: B: / * --- The source disk here is a disk, the target disk is the B disk --- * /
4. Label - Creating a Disk Tag Command To create, change, delete disk scroll. ü Type: External Command ÜÜ Format: Label [Distribution:] [Volume Label] for 4: C: /> Label C: YYY / * --- Change the Colescence Covered to YYY --- * / 5 . VOL - Display Disk Tag Command Features: View disk volume marks. ü Type: Internal Command ÜÜ Format: VOL [Disk] for 5: C: /> Vol C: Volume In Drive C406-93646. SYS - System Replication Command ü Features: Transfer the DOS system files IO.SYS, MSDOS.SYS, and Command.com on the current drive to the specified drive. Type: External Command ÜÜ Format: SYS [Disk] * Description: If the disk remaining space is not enough to store system files, then Tip: No roomfor on Destination Disk.for 6: C: /> SYS D: System TRANSFERRED / * - - The system file has been transferred to the D disk --- * / 7. XCOPY - Directory Copy Command ü Features: Copy all files in the specified directory and directory together with the directory structure. Type: External Command ü Format: XCOPYÜ [Source Disk:] [Target Drive:] [Target Road Name] [/ S] [/ V] [/ e] Description: Xcopy is the expansion of COPY, Copy the specified directory and directory structure, but you cannot copy the hidden files and system files; use / s to copy all the files under the source directory and its subdirectory. Unless specified / e parameters, / s does not copy the empty directory, if the / s parameter is not specified, the XCopy only copies the source directory itself, and does not involve the subdirectory under which it is selected, and the copy is copied. The sectors are checked, but the speed will be reduced. For 7: c: /> xcopy YYY D: YYY.TXT 1 File (s) Copied8. FC - File comparison command function: Compare the spread of the file, and list the difference. ü Type: External Command ÜÜ Format: FC [Disk] [Path Name] [Distribution:] [Path Name] [File Name] [/ A] [/ B] [/ C] [/ N ] Description: Select / a parameters, compare the ASCII code; choose / b parameter, for binary comparison mode; select / c parameters, regard case of case characters as the same character; choose / n parameters, in ASCII code comparison method Next, the line number is displayed. For 8: c: /> fc yyy.txt Cly.txtComparing Files YYY.TXT and CLY.TXT ****** YYY.TXTOEEKJEHEQWKF ****** CLY.TXT1111 ****** 9. Attrib - Modify the file attribute command function: Modify the properties of the specified file. ÜÜ Type: External command. ü Format: Attrib [file name] [R] [- r] [A] [- a] [h] [- h] [S] [- s] [/ s] description: Select R parameters, set the specified file For the read-only properties, this file can only be read without writing data or deletion, selecting a -R parameter, removing the read-only attribute; the a parameter is the file property; the h parameter is an implied attribute; S parameter is system properties.