China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 23:56
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Could everyone tell me some commonly used DOS commands! [Original] View 1,428 Replies 12
Original Poster Posted 2003-05-17 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 127
Posts 6
Joined 2003-05-16 00:00
23-year member
UID 2140
Gender Male
Status Offline
Could everyone tell me some commonly used DOS commands!
Floor 2 Posted 2003-05-18 00:00 ·  中国 湖北 武汉 江夏区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Take a look at the posts in the forum first, and if there’s anything you don’t understand, just make a post and ask..
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 3 Posted 2004-08-03 00:00 ·  中国 上海 宝山区 电信
初级用户
★★
Credits 217
Posts 55
Joined 2004-08-02 00:00
22-year member
UID 29516
Gender Female
Status Offline
cd    change the current directory
cls    clear the screencopy   copy filesdel    delete filesdeltree delete a directory treedir    list file namesdiskcopy copy disksedit   text editorformat  format a diskmd    create a subdirectorymem    view memory statusmore   paged displaymove move files, rename directoriesrd    delete a directoryren    rename filestype   display file contentsys    create a DOS system diskxcopy  copy directories and files
attrib set file attributeschkdsk check a diskdate   display and modify the datedefrag disk defragmentationdoskey recall DOS commandsemm386 expanded memory managementfdisk  hard disk partitioninghelp   helplabel  set the volume labellh    load a program into high memorymemmakermemory optimization managementmsd   system detectionpath   set the search pathprempt set the promptrestore restore backup filestime   display and modify the timescandiskcheck and repair a diskset   set environment variablessmartdrvset disk acceleratorundeleterestore deleted filesnot commonly used
 
append set the path for non-executable filesdebug  random debugging programdiskcompdisk compareexpand restore DOS filesfasthelpquickly display help informationfc    file compareinterinkstart the serverintersvrstart the clientqbasic Basic integrated environmentsetver set versionshare  file sharingsubst  path substitutiontree   list the directory treeunformatrestore a formatted diskvsafe  anti-virusver   display the DOS version numbervol   display the disk volume labelctty   change the control device
Floor 4 Posted 2004-08-03 00:00 ·  中国 上海 宝山区 电信
初级用户
★★
Credits 217
Posts 55
Joined 2004-08-02 00:00
22-year member
UID 29516
Gender Female
Status Offline
Commonly used internal commands DOS internal commands are the basis of DOS operation. Below is an introduction to some commonly used DOS internal commands. 1. DIR
Meaning: display information for all files or directories on the specified path
Format: DIR
Parameters:
/W: wide-screen display, showing 5 filenames per line, without displaying modification time, file size, and other information;
/P: paged display; when the screen cannot display all the information completely, this can be used for page-by-page display;
/A: display files with special attributes;
/S: display all files in the current directory and its subdirectories.
Example: DIR /P
This will display the files in the current directory page by page. At the end of the current screen there is a “Press any key to continue . . .” prompt, meaning press any key to continue. 2. CD
Meaning: enter the specified directory
Format: CD
Example: CD DOS
The CD command can only enter directories on the current drive. “CD\” returns to the root directory, and “CD..” returns to the previous directory level. 3. MD
Meaning: create a directory
Format: MD
Example: MD TEMP
This means creating a directory named TEMP on the current drive. 4. RD
Meaning: delete a directory
Format: RD
Example: RD TEMP
This means deleting the TEMP directory under the current path. Note that this command can only delete empty directories. 5. COPY
Meaning: copy files
Format: COPY
Example 1: COPY C:\*.COM D:\" means copying all files with the extension COM in the root directory of drive C to the root directory of drive D.
Example 2: COPY C:\autoexec.bat C:\autoexec.bak
This means copying the autoexec.bat file into a file with the extension BAK. Enter the DIR command and you can see this change. 6. DEL
Meaning: delete files
Format: DEL
Example: DEL C:\ *.BAK /P
This means deleting all files with the extension BAK in the current directory. The /P parameter causes the user to be asked for confirmation on each file when deleting multiple files. 7. SYS
Meaning: system file transfer command.
Format: SYS
Example: SYS C: A:
This command will transfer the system files to drive A. After the transfer succeeds, drive A will become a boot disk. Commonly used external commands DOS external commands are application programs. These external commands all exist in the form of files. The DOS external commands in Windows are stored in the Command directory under the main Windows directory. Below is an introduction to several commonly used DOS external commands. 1. EDIT
Meaning: a simple editing program that can be used to edit some programs and batch files.
Format: EDIT
Example: EDIT C:\Autoexec.bat
After entering this command, the editor will open. After entering the file contents in editing mode, press Alt+F to activate the File menu, then press the down arrow to select Exit. It will ask whether to save the content just entered. If you want to save it, just enter Y or press Enter directly. 2. FORMAT
Meaning: formatting command, which can format floppy disks and hard disks.
Format: FORMAT
Example: FORMAT A: /S/Q
This command will format drive A. The parameter /Q means quick formatting, and /S means that after formatting is completed, the system boot files will be copied to the disk, so the disk can be used as a DOS system boot disk. During formatting, the screen will display the percentage completed. After formatting is complete, it will prompt you to give the disk a name, and finally it will also report the disk's total space and available space, etc. 3. XCOPY
Meaning: copy command
Format: XCOPY
Example: XCOPY C:\ABC D:\ /s
After executing this command, the C:\ABC directory and all files in that directory will be copied to the root directory of drive D. XCOPY is an enhanced version of COPY and can copy multiple subdirectories. The most commonly used parameter is /S, which can copy all subdirectories under a directory. 4. DELTREE
Meaning: delete directory tree
Format: DELTREE
Example: DELTREE ARE
This means deleting the ARE subdirectory under the current path. After execution it will ask whether to confirm deletion. Press Y to delete it.
Floor 5 Posted 2004-08-03 00:00 ·  中国 上海 宝山区 电信
初级用户
★★
Credits 217
Posts 55
Joined 2004-08-02 00:00
22-year member
UID 29516
Gender Female
Status Offline
winver---------check Windows version  wmimgmt.msc----open Windows Management Infrastructure (WMI)   wupdmgr--------Windows Update program   wscript--------Windows Script Host settings   write----------WordPad   winmsd---------system information   wiaacmgr-------scanner and camera wizard   winchat--------XP built-in LAN chat   mem.exe--------display memory usage   Msconfig.exe---system configuration utility   mplayer2-------simple widnows media player   mspaint--------Paint   mstsc----------Remote Desktop Connection   mplayer2-------media player   magnify--------magnifier utility   mmc------------open the console   mobsync--------sync command   dxdiag---------check DirectX information   drwtsn32------ system doctor   devmgmt.msc--- Device Manager   dfrg.msc-------disk defragmenter   diskmgmt.msc---disk management utility   dcomcnfg-------open system component services   ddeshare-------open DDE share settings   dvdplay--------DVD player   net stop messenger-----stop the Messenger service   net start messenger----start the Messenger service  notepad--------open Notepad   nslookup-------tool wizard for network administration   ntbackup-------system backup and restore   narrator-------screen “Narrator”   ntmsmgr.msc----removable storage manager   ntmsoprq.msc---removable storage operator requests   netstat -an----(TC) command to check interfaces   syncapp--------create a briefcase   sysedit--------system configuration editor   sigverif-------file signature verification program   sndrec32-------sound recorder   shrpubw--------create a shared folder   secpol.msc-----local security policy   syskey---------system encryption; once encrypted it cannot be undone, protects the dual passwords of the windows xp system   services.msc---local services settings   Sndvol32-------volume control program   sfc.exe--------system file checker   sfc /scannow---windows file protection   tsshutdn-------60-second countdown shutdown command   tourstart------xp introduction (the roaming xp program that appears after installation is completed)   taskmgr--------Task Manager
 eventvwr-------Event Viewer   eudcedit-------character creation program   explorer-------open Explorer   packager-------object packager   perfmon.msc----computer performance monitor   progman--------Program Manager   regedit.exe----registry  rsop.msc-------Resultant Set of Policy   regedt32-------Registry Editor  rononce -p ----shutdown in 15 seconds  regsvr32 /u *.dll----stop dll files from running  regsvr32 /u zipfldr.dll------cancel ZIP support   cmd.exe--------CMD command prompt   chkdsk.exe-----Chkdsk disk check  certmgr.msc----certificate management utility   calc-----------start Calculator   charmap--------start Character Map   cliconfg-------SQL SERVER client network utility   Clipbrd--------Clipboard Viewer   conf-----------start netmeeting   compmgmt.msc---Computer Management   cleanmgr-------junk cleanup   ciadv.msc------indexing service program   osk------------open the on-screen keyboard   odbcad32-------ODBC data source manager   oobe/msoobe /a----check whether XP is activated   lusrmgr.msc----local users and groups   logoff---------logoff command   iexpress-------trojan bundling tool, included with the system   Nslookup-------IP address detector   fsmgmt.msc-----shared folders manager   utilman--------utility manager   gpedit.msc-----Group Policy
Floor 6 Posted 2004-08-03 00:00 ·  中国 上海 宝山区 电信
初级用户
★★
Credits 217
Posts 55
Joined 2004-08-02 00:00
22-year member
UID 29516
Gender Female
Status Offline
Detailed enough, right~!
Floor 7 Posted 2004-08-03 00:00 ·  中国 辽宁 抚顺 联通
银牌会员
★★★
Credits 1,186
Posts 510
Joined 2004-07-30 00:00
22-year member
UID 29279
Gender Male
Status Offline
These were all copied from somewhere, right!
Floor 8 Posted 2004-08-03 00:00 ·  中国 河南 三门峡 陕州区 联通
初级用户
Credits 129
Posts 14
Joined 2004-08-01 00:00
22-year member
UID 29482
Gender Female
Status Offline
That’s really a lot!
Floor 9 Posted 2004-08-05 00:00 ·  中国 广东 潮州 电信
初级用户
Credits 114
Posts 7
Joined 2004-08-05 00:00
22-year member
UID 29686
Gender Male
Status Offline
So much... I’ll read through it slowly too ``OHOH
Floor 10 Posted 2004-08-05 00:00 ·  中国 辽宁 抚顺 联通
银牌会员
★★★
Credits 1,186
Posts 510
Joined 2004-07-30 00:00
22-year member
UID 29279
Gender Male
Status Offline
Stop wasting time, all of you!
Floor 11 Posted 2004-08-05 00:00 ·  中国 安徽 合肥 巢湖市 电信
初级用户
Credits 107
Posts 4
Joined 2004-08-05 00:00
22-year member
UID 29707
Gender Male
Status Offline
This is great! I can finally learn some DOS. Thanks, everyone.
Floor 12 Posted 2004-08-05 00:00 ·  中国 安徽 合肥 巢湖市 电信
初级用户
Credits 107
Posts 4
Joined 2004-08-05 00:00
22-year member
UID 29707
Gender Male
Status Offline
(1) MD——Create a subdirectory
1. Function: create a new subdirectory
2. Type: internal command
3. Format: MD〈subdirectory name〉
4. Instructions for use:
(1) “drive”: specifies the disk drive letter where the subdirectory is to be created; if omitted, the current drive is used;
(2) “path”: the name of the parent directory in which the subdirectory is to be created; if omitted, it is created under the current directory.
Example: (1) Create a subdirectory named FOX under the root directory of drive C; (2) Then create a USER subdirectory under the FOX subdirectory.
C:、>MD FOX (create the FOX subdirectory on the current drive C)
C:、>MD FOX 、USER (create the USER subdirectory under the FOX subdirectory)
(2) CD——Change the current directory
1. Function: display the current directory
2. Type: internal command
3. Format: CD
4. Instructions for use:
(1) If the path and subdirectory name are omitted, the current directory is displayed;
(2) If the “CD、” format is used, it returns to the root directory;
(3) If the “CD.。” format is used, it returns to the upper-level directory.
Example: (1) Enter the USER subdirectory; (2) Return from the USER subdirectory to the subdirectory; (3) Return to the root directory.
C:、>CD FOX 、USER(enter the USER subdirectory under the FOX subdirectory)
C:、FOX、USER>CD.。 (return to the upper-level root directory)
C:、FOX>CD、 (return to the root directory)
C:、>
(3) RD——Delete subdirectory command
1. Function: delete a directory from the specified disk.
2. Type: internal command
3. Format: RD
4. Instructions for use:
(1) The subdirectory must be empty before deletion, that is, you must first enter the subdirectory and use DEL (the command for deleting files) to delete all files under the subdirectory, then return to the upper-level directory and use the RD command to delete the directory itself;

(2) The root directory and current directory cannot be deleted.
Example: To delete the USER subdirectory under the FOX subdirectory on drive C, the operation is as follows:
Step 1: First delete all files under the USER subdirectory;
C、>DEL C:、FOX、USER、*。*
Step 2, delete the USER subdirectory.
C、>RD C:、FOX、USER
(4) DIR——Display disk directory command
1. Function: display the contents of a disk directory.
2. Type: internal command
3. Format: DIR
4. Instructions for use: use of /P; when there is too much in the directory to be viewed and it cannot all be displayed on one screen, the screen will keep scrolling upward and it will not be easy to see clearly. After adding the /P parameter, the screen will display 23 lines of file information per page, then pause and prompt: Press any key to continue
Use of /W: after adding /W, only the filenames are displayed, while the file size and creation date and time are omitted. After adding the parameter, five filenames can be displayed per line.

PATH——Path setting command
1. Function: set the search path for executable files; only effective for files.
2. Type: internal command
3. Format: PATHdirectory{,〈directory path2〉…}
4. Instructions for use:
(1) When running an executable file, DOS will first search for the file in the current directory. If found, it runs it; if the file is not found, it will search for the file in the directories specified by the PATH command, one by one in order;
(2) If there are two or more paths in the PATH command, they are separated by a semicolon “;”;
(3) The PATH command has three usage methods:
PATH… (set the search path for executable files)
PATH: (cancel all paths)
PATH: (display the currently set paths)
(6) TREE——Display disk directory structure command
1. Function: display all directory paths on the specified drive and all filenames under those directories.
2. Type: external command
3. Format: TREE
4. Instructions for use:
(1) When the /F parameter is used, all directories and all files under the directories are displayed; if omitted, only directories are displayed, not the files under them;
(2) When the >PRN parameter is used, the listed directories and the filenames in the directories are printed out.
(7) DELTREE——Delete entire directory command
1. Function: delete the entire directory and its subordinate subdirectories and files.
2. Type: external command
3. Format: DELTREE〈path〉
4. Instructions for use: This command can delete the directory and all files, subdirectories, and lower-level subdirectories under it in one step. No matter whether the file attributes are hidden, system, or read-only, as long as the file is located under the directory being deleted, DELTREE treats them all the same and deletes them without exception. Be very careful when using it!!!
Floor 13 Posted 2004-09-05 00:00 ·  中国 台湾 中华电信(HiNet)
初级用户
Credits 103
Posts 1
Joined 2004-09-05 00:00
21-year member
UID 31162
Gender Male
Status Offline
This post is organized very thoroughly. For a newbie like me, it’s very practical. Thanks everyone for sharing.
Forum Jump: