DOS Base Command
CD Change current directory sys make DOS system disk
Copy copy file del Delete file
deltree delete directory tree dir column file name
diskcopy disk Edit Text Edit
Format formatted disk MD to establish subdirectories
Mem View memory Status type display file contents
Rd Delete Directory ren change filename
Remember how many ah, forget to go to class to see, the following four commands are new, give the command format, you try to learn the computer is important is groping.
CLS Clear Screen
[Application] too messy on the screen, or garbled on the screen, clear the contents of the screen without affecting any information inside the computer
[Usage] CLS carriage return
Move file, change directory name
[Apply] Move files to a different directory
[Usage] move [filename] [directory] moving files to the new directory
Move [directory name] [directory name] Change directory name
[Example] C:\>move c:\autoexec.bat c:\old??
Move the Autoexec.bat file to the old directory
C:\>move c:\config.sys c:\old??
Move the Config.sys file to the old directory
More split-screen display
[Applicable occasions] when the output of a lot of a screen is not enough to use, almost all the commands, especially type and other commands are useful. When you use more, the disk cannot be write-protected, nor is it suitable for the optical drive.
[Usage] type [filename] | More split-screen display file contents
more < [filename] Split-screen display file contents
[Example] C:\>type msdos.w40 | More
xcopy Copy directories and files
[applicable occasions] are useful for copying with subdirectories, much faster than copy commands when copying a large number of files
[Usage] xcopy [filename] [directory] Copy the specified file to the specified directory
xcopy [Source directory] [destination directory] to test the source directory to the destination directory
xcopy *.* [directory]/s to copy files and nonempty directories to a specified directory
Other common parameters are: V-copy after the check, will affect the speed
E is similar to S, but can be copied even if the subdirectory is empty.
Help helps
[Applicable occasions] when you want to know specifically how to use DOS commands
[Usage] Help provides all DOS command assistance
Help [DOS commands] provide assistance on commands
If you only remember a command roughly, you can enter the help command directly after the prompt, and the following screen appears:
attrib Settings file properties
[Where applicable] when you want to do more special work on a file
[Usage] attrib display properties of all files
attrib +r or-R [FileName] Sets whether the file property is read-only
attrib +h or h [FileName] Sets whether the file property is implied
attrib +s or-s [filename] Sets whether the file property is a system file
attrib +a or a [filename] set whether the file property is an archive file
attrib/s setting file properties including subdirectories
[Example] C:\test>attrib +r wina20.386
C:\>attrib +h *.*/s?? Suppress All Files
Date Display and modification dates
[Applicable occasions] want to know or modify the time and date
[Usage] Date shows and changes the current date
[Example] c:\>date 09-20-1996?? Change the date to September 20, 1996
C:\>date??
Current date is Tue 08-20-1996
Enter new Date (MM-DD-YY): 09-20-1996
Modify the current date by month-day-year order press ENTER directly to ignore the modified date
Lable Set the volume label
[applicable occasions] used to mark the disk
[Usage] Label displays the disk volume label
label [letter] [volume name] set the volume label for the specified disk
[Example] C:\>label??
Volume in drive C is WANG
Volume Serial number is 2116-1dd0
Volume label (one characters,enter for none)?
You can enter the volume label, directly after the return
Delete Current volume label (y/n)?
Press Y to delete the old volume label, and press N not to change
Defrag Disk defragmentation
[applicable] disk reads and writes many times, or the disk uses the time to be very long, may need to use this command to defragment the disk. Disk fragmentation does not mean that the disk is broken, but that the disk usage is choppy and slows down due to multiple copies and deletion of files.
[Usage] 1. C:\>defrag??
2. Select the disks you want to defragment
3. Computer analysis of disk status, and then tell us how many disks need to be sorted. Press the ESC key
4. Select optimization method (disk optimization), select "Optimize All" or "Optimize files only"
5. Select Begin Optimization Start finishing
6. After finishing, press ENTER
7. Press ESC to exit.
Doskey invoke and create a DOS macro command
[Applicable occasions] it is very useful to enter repetitive commands frequently.
[Usage] Doskey
The Doskey resides in memory, creates a buffer, and the commands entered later are saved in the buffer and can be invoked at any time
DOSKEY [Macro command name]=[command name]
To define a macro command as a command, and then enter a macro command, the computer will execute the appropriate command
Doskey/reinstall Reinstall Doskey
Doskey/bufsize= set the size of the buffer
Doskey/macros Display all Doskey macros
Doskey/history display all commands in memory
Doskey/insert|overstrike sets whether the newly typed characters overwrite the old characters
[Example] C:\>doskey??
C:\>dir
C:\>copy C:\temp\*.* A:
C:\>del C:\temp\*.*
C:\>copy b:\*.* C:\Temp
All of the above four commands have been saved, with the cursor control key can choose to use or modify in turn, you can use the F7 key to list all the saved commands
C:\>doskey di=dir/w/p?? Define DI as macro command, which means execute dir/w/p
Fdisk hard disk Partitions
[Recommended] Only if the hard disk is infected with a very good virus, or a new hard disk needs to partition, it is best to ask the knowledgeable person to guide. Hard drive all need to go through low-level format, partition, format three steps only can use, the hard disk inside the finished computer has already done these processing.
[Usage] Enter fdisk and press ENTER to enter the prompt interface
EMM386 Extended Memory Management
[Recommended] This command is more complex, in the fifth chapter in the system configuration will be described in detail
Lh/loadhigh the program into high-end memory
[Applicable occasions] This command is generally used in Autoexec.bat, when some software requires a large amount of basic memory, it will be useful
[Usage] LH [program]
To load a program into high-end memory when you use this command, the following two statements are required in the Config.sys file. Device=emm386.exe Dos=umb
LH [Program]/L: Area code to load the program into the specified UMB area
LH/S is typically made by MemMaker
[Example] C:\mouse\>lh MOUSE?? Load the mouse driver into high memory
MemMaker Memory Optimization Management
[Applicable occasions] This command is now rarely used, when the DOS popular, want to play the game can not be without it, it can free up a lot of basic memory for the game to use, just install once
[Usage] 1. C:\>memmaker??
2. Enter continue, F3 exit
3. Choose manual Installation and automatic installation, direct carriage return means automatic installation (enter get)
4. Choose whether there is a program need to expand the memory, you can choose the space bar, yes to indicate the need, no no need, press ENTER.
5. The program automatically detects if Windows is installed in the hard drive
6. Floppy drive If there is a floppy disk should be taken out, and then press ENTER, the computer will restart two times, do not interrupt, just press ENTER.
(actually very simple, always press ENTER on the line, hehe)
MSD System Detection
[applicable occasions] used to check system information
[Usage] 1. C:\>MSD return to see the following screen, add a note next to each option, indicating the function of the button
?? 2. Select the items you want to query, such as selecting the first Computer, a dialog box will pop up to display some basic information about your computer. You can try other options to see what's the use.
3. After pressing ALT+F to activate the Pull-down menu, select "Exit" to exit.
Undelete Recovery of deleted files
[Applicable occasions] when you accidentally delete the wrong file, it can be used.
DOS deletes the file, only removes the file from the allocation table, deletes the first letter of the filename in the disk storage area, the file content does not immediately remove from the disk, therefore can recover.
[Usage] Undelete recover deleted files
Undelete/all recover the file and no longer asks for recovery,
In the order of "#%&-0123456789abcdefghijklmnopqrstuvwxyz" for the first
Letters to restore files
Undelete/list Column recoverable file name
UNDELETE/S can host undelete memory, but few people use it
Prompt setup Prompt
[Applicable occasions] when you're tired of the c:\> prompts or if you want to make your prompts unique, you can try a very interesting DOS command that shows time and date at any moment.
[usage] prompt $p $g The current directory name and the > number as the prompt, which is the most commonly used prompt
Prompt $t represents the time prompt $d represents the date
Prompt $$ represents $ prompt $q =
Prompt $v represents the current version prompt $l representation <
Prompt $b said | Prompt $h represents the abdication character
The prompt $e represents the character prompt the ESC represents $_ the carriage return line change
[Example] c:\dos>prompt wang$g?? Use wang> as a prompt
Wang>prompt $t $d$g?? Use the time, date, and > number as a prompt
0:01:07.77thu 08-29-1996>prompt $p $g??
C:\dos>
Restore restores a backed-up file
[Recommended] If you have previously made a file backup with backup, you can use it to recover files if the original file is corrupted.
The files on the disk backed up with the backup command are restored to another disk with the two files backup.00x and control.00x on the backup disk.
[Usage] restore [Backup letter] [Destination letter]
Restore the backup file on the backup disk to the specified disk
RESTORE/S restores the backup file including subdirectories to the specified disk
Restore/p lets users determine whether to recover files
Restore/b: Files prior to date recovery date
restore/a: Files After date recovery date
RESTORE/L: Files prior to time recovery time
restore/e: Files After time recovery time
Restore/m only restores files that have been modified since the last backup
restore/n only recovered files that have been deleted since the last backup
RESTORE/D only displays the file name to be recovered
[Example] C:\dos>restore a:c:??
Insert backup diskette in drive A:
Press any key to continue ...
In a drive to put the first backup disk, press any key can be restored after the first, in order to put the other disk can be.
When you do not recover the file correctly with the above command, use:
C:\dos>restore a:c:\/s??
Time display and modification times
[Applicable occasion] used to display and modify the time, use the same date
[Example] c:\\dos>time??
Current time is 12:15:26.04a
Enter New time:11:20:20.00p
On time: In-order input times, plus the afternoon (a/p) can be directly pressed enter key to ignore the modification time.
Set setting environment variables
[Applicable occasions] to set the sound card and path to use when
[Usage] SET [environment variable]=[string]
This order is often used in Autoexec.bat.
[Example] c:\>set blaster=a220 i5 d1 Setting the parameters of a sound card
C:\>set Path=c:\dos path C:\dos the same meaning
SMARTDRV Set up Disk accelerator
[Recommended] It can improve the speed of hard disk access, preferably in the Autoexec.bat file load it.
[Usage] smartdrv/x
It is a more common method to execute and host memory, to open disk acceleration buffers, and to block all drive caches (this is generally enough for this command).
Smartdrv/c writes the information in the cache to the hard drive
SMARTDRV/E: Numbers set the amount of information moved at a time
Smartdrv/b: Number set pre-read buffer size
Append to set the path of a non-executable file
[Where applicable] when you can't find your own input in more than one directory, try this command, which is similar to path.
[Usage] append [path]; Path
[Example] c:\>append c:\test??
Set to find a non-executable path to c:\\test if there is a file 1.txt in the directory, you can automatically find the C:\\test directory when the other directory is down with 1.txt.
D:\ucdos>edit 1.txt can find C:\test\1.txt files
Debug Program Debugging Command
If you have learned assembly language, you should use Debug, if you haven't learned it, it's best not to use
[Usage] debug [filename]
Diskcomp comparison Disk
[Applicable occasions] compare the two discs are the same, did not think when will be used, in comparison with diskcopy copies of the two disks, why not diskcopy/v check it?
[Usage] diskcomp [letter 1] [Disk letter 2] Comparison disk 1 and 2
DISKCOMP/1 only compares the first side of the disk
DISKCOMP/8 only compares the first 8 sectors with no tracks.
[Example] C:\>diskcomp a:a:
Compare two disks in the same floppy drive
Insert the diskette in drive A:
Put in the first disc
Press any key to continue ...
Comparing tracks sectors per track, 2 side (s)
Insert SECOND diskette in drive A:
Put in the second disc
Press any key to continue ... Compare OK
Comparison found no different
Compare another diskette (y/n)? N
Compare other disks, select Y continue to compare, select N Stop
Expand Decompression Tool
[Applicable occasions] Microsoft software Original installation disk has many suffixes to "_" the end of the compressed file, you can use it to extract, relieve you because of a few file loss caused by the trouble.
[Usage] expand [source filename] [destination file]
[Example] C:\>expand a:vsafe.co_ c:\dos\vsafe.com
Jean 庋 Vsafe.co_ as vsafe.com file
Microsoft (R) File expansion Utility Version 2.10 Copyright (C) Microsoft Corp. 1990-1993. All rights reserved.
Expanding A:vsafe.co_ to c:\dos\vsafe.com. a:vsafe.co_:33046 bytes expanded to 62576 bytes, 89% increase.
C:\dos>
Fasthelp Quick display of help information
[Suggest] You can look at all the commands, for individual commands, as well as after the command name plus/? parameter convenient
[Usage] FASTHELP lists the usefulness of all DOS commands
fasthelp [command name] shows the use of a command, equivalent to [command name]/?
FC File Comparisons
[Suggested] Maybe for most people it's never going to work.
[usage] FC [filename 1] [filename 2] Compare the different parameters of two files also: a C l lbn N T w nnnn
[Example] C:\TEST>FC a.bat b.bat??
Comparing Files A.bat and B.bat
A.bat
Choice/c:dme Defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto MEM
If Errotlevel 1 goto end
B.bat Choice/c:dme Defrag,mem,end
C:\test>
Interlnk Start Simple Network client
[Applicable occasions] if you have two computers that can be used to connect to a simple network via INTERSVR, this is a very useful command, but not a common one.
[Usage] DOS new support network features,
It makes it possible for two computers to compose a simple network using a combined port or serial line Interlnk must add a sentence to the Config.sys:
Device=c:\dos\interlnk
Parallel to the end of the line should be 25-pin joints, the needle connection between the following figure: corresponding
P2------------------------P15
P3------------------------P13
P4------------------------P12
P5------------------------P10 Joint is a needle-carrying
P6------------------------P11 female connector is a hole
P15-----------------------P2
P13-----------------------P3
P12-----------------------P4
P10-----------------------P5
P11-----------------------P6
P25-----------------------P25 Ground
[Example] C:\dos\>interlnk port-lpt1
This Computer the other Computer
(Client) (Server)
----------------------------------------
E:equals A:
F:equals C:
In the client, e disk is the server a disk, F disk is the server C disk
Intersvr start a simple Web server
[Application] Use it, the computer becomes the server (only with DOS provided Simple network)
[Usage] intersvr start the service machine
Intersvr/lpt:1 starts the service machine, uses the LPT1 port as the data transmission port
Intersvr/com:1 starts the service machine, uses the COM1 port as the data transmission port
Parameters also have x baud:b v rcopy (see INTERLNK)
[Example] c:\dos>intersvr??
QBasic Start Basic Integration environment
[Suggested] Maybe for most people it's never going to work.
[Usage] If you qbasic a language, you can use it to write your own program. Edit.com must have it in order to be available.
QBasic starting Basic Language environment
Qbasic/editor editing languages in Full-screen mode
Parameter also: b G h MBF Nohi Run
[Example] c:\dos>qbasic??
Setver Set version
[Applicable] When you want to use a different version of the DOS command, you can use it to deceive the computer. In high DOS, some older versions of the program need to be DOS3.3, and setver can be used to set
[Usage] In general, add Device=setver.exe in Config.sys
Setver displays the version of the file
setver [filename] N.nn Set the version number of the specified file
[Example] c:\dos>setver??
KERNEL. EXE 5.00
Dosoad. SYS 5.00
EDLIN. EXE 5.00
BACKUP. EXE 5.00
Assign.com 5.00
Exe2bin. EXE 5.00
JOIN. EXE 5.00
RECOVER. EXE 5.00
Winword. EXE 4.10
C:\>
If the program AAA.exe must be executed under ms-dos3.3, type
C:\dos>setver aaa.exe 3.30??
Also, if the Net5.exe is executed only under ms-dos5.0, then it can be run under ms-dos6.22 after adding Device=setver.exe in Config.sys.
Share file sharing
[Recommended] only if the software declaration must run it
[usage] can be added to the Config.sys Install=share.exe can also be directly run parameters have f l
Subst path substitution
[Suggest] A very interesting command that may be useful if you frequently use CD-ROM software.
[Usage] subst display the current alternate path
subst [letter] [path]
Replaces the specified path with the disk character, which is used as a drive
Subst/b to remove the substitution
[Example] C:\dos>subst a:c:\temp?? Replace a disk with a C disk temp directory
C:\>subst A:/D Jean Xie? Alternative
Tree Display Command trees structure
[Where applicable] view all subdirectories
[Usage] tree [disk] shows all subtrees
tree/f Display the file name when displaying the table of contents
tree/a the directory tree in ASCII code
[Example] c:\windows>tree/a??
Unformat Recover a formatted disk
[Suggest] You format the floppy disk with important information? quickly use Unformat ... You used format/u, and you're dead.
[Usage] unformat [disk] Restores the specified formatted disk
UNFORMAT/L displays the filename found by unformat
[Example] C:\windows>unformat a:??
Vsafe Virus Protection Program
It is more useful to load it into memory to detect many viruses at any time.
[Usage] vsafe load Vsafe in memory
vsafe/u removal of Vsafe from memory
Vsafe/ne load Vsafe into expanded memory
VSAFE/NX load Vsafe into extended memory
Parameters and Ax Cx n d
[Example] C:\>vsafe
Ver Display DOS version
[Example] C:\>ver
?? MS-DOS Version 6.22
C:\>
Vol Displays the specified disk volume label
[Example] C:\>vol??
Volume in drive C is Wang
Volume Serial number is 2116-1dd0
C:\>
Ctty Change Control equipment
[Recommended] To change the control of the input, you can try this command, but I'm afraid it will not have any effect, is one of the most useless DOS commands
[Usage] ctty [device name] Setting console
[Example] c:\>ctty aux?? Set aux to input.
Are you dazzled by the introduction of so many orders? The key to learning DOS is to practice all kinds of commands, but I have to give you a wake-up call, some orders to be careful, otherwise too late.
Del *.* Delete all files in current directory
[Recommended] The use of Del *.* in the C-packing directory will make the computer can not find the mouse, optical drive, can not use Windows, or even start. In fact, using this command in any directory requires good consideration.
deltree *.* Delete all directories and files under current directory
[Recommended] Use this command in the C-packing directory, and you have to make sure your mind is clear, and you are sure that it is necessary, but we do not believe that this command should be used in any way. Using deltree *.* In any directory produces the same or worse results as Del *.*. Beware of it! Beware of it!
Format c:/u formatted c disk
[Suggest] unless your hard drive is infected with a virus, or if a real computer expert tells you to do so, do not format the C disk, which will cause you to lose all information and take several hours to reinstall all the software.
Fdisk hard disk Partitions
[Suggest] when the hard disk partitions, must let a person who has used this command to help you use, otherwise you will lose all information, even the hard disk can not use.
Recover Overwrite Disk
[Recommended] After DOS 6 no longer has this command, if you are using the old version of DOS, advised you not to use it at any time, it has nothing to do but to destroy all the information on your hard drive has no other role.