删除文件夹 rmdir /s删除子目录 所有指令加 /? 查看可选参数
按Date显示 dir /od (od :order by date)
按Name显示 dir /on
显示所有分区:diskpart->list volume(Ctrl+C :exit diskpart mode)
显示所有网络映射:net use
搜索文件:dir /s *txt(在当前目录和所有字目录列出所有以txt结束的文件)
如果要在DOS下访问网上邻居,需要用到net use命令
此命令的语法是:
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]
NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]
不加参数的话就显示当时网络映射。
devicename 表示要映射的驱动器名字,也可以用 * 表示下一个能用的设备名
\\computername 指需要映射的计算机名
\sharename 共享名
\volume 指NetWare server上的卷名
password 映射时需要的密码,用*表示密码提示
/USER:[domainname\]username 指定用户以何种身份登录
/HOME 连接进入用户主目录
/DELETE 关闭连线
/PERSISTENT:{YES | NO} 设置用户下一次登录是时是否重新连入
复制文件夹 xcopy
xcopy C:\temp /e 复制C:\temp的文件及文件夹到当前目录(经测试不会有temp目录,只有其子文件,所以最好用xcopy C:\temp .\temp /e)
cmd 這個命令是調用類似dos的命令窗口的命令,在這裡你可以像操作DOS一樣操作Windows.
calc 计算器
appwiz.cpl 添加/删除程序
cleanmgr 磁盘垃圾清理
taskmgr 任务管理器
osk 屏幕鍵盤
文件夾選項 control folders
inetmgr 這個命令相信做過網站的都知道,對了這就是調用IIS的快捷命令。
mstsc 這個是用來啟動遠程桌面連接的快捷命令,相信搞過網絡的人對此不會陌生。
regedit 這個命令大家都很熟悉,是用來調用註冊表的。
control userpasswords2 進入用戶賬戶設置界面的命令
command.com 調用的則是系統內置的 NTVDM,一個 DOS虛擬機。它完全是一個類似 Virtual PC 的 虛擬環
境,和系統本身聯繫不大。當我們在命令提示符下運行 DOS 程序時,實際上也 是自動轉移到 NTVDM虛擬機下,和 CMD
本身沒什麼關係。
chkdsk.exe 磁盤檢查
compmgmt.msc 計算機管理
devmgmt.msc 設備管理器
diskmgmt.msc 磁盤管理實用程序
dfrg.msc 磁盤碎片整理程序
drwtsn32 系統醫生
dvdplay Windows Media Player
explorer 資源管理器
dxdiag DirectX Diagnostic Tool
gpedit.msc 組策略編輯器
gpupdate /target:computer /force 強制刷新組策略
eventvwr.exe 事件查看器
logoff 註銷命令
lusrmgr.msc 本地用戶和組
msinfo32 系統信息
msconfig 系統配置實用程序
net start (servicename) 啟動該服務
net stop (servicename) 停止該服務
notepad 記事本
nusrmgr.cpl 同control userpasswords,打開用戶帳戶控制面板
Nslookup IP地址偵測器
oobe/msoobe /a 檢查XP是否激活
perfmon 計算機性能監視器
regedt32 註冊表編輯器
regsvr32 /u *.dll 停止dll文件運行
route print 查看路由表
rononce -p 15秒快速關機
rsop.msc 組策略結果集
rundll32.exe rundll32.exe %Systemroot%\System32\shimgvw.dll,ImageView_Fullscreen 啟動一個空白的Windows 圖
片和傳真查看器
secpol.msc 本地安全策略
services.msc 本地服務設置
sfc /scannow 啟動系統文件檢查器
sndrec32 錄音機
tsshutdn 60秒倒記時關機命令
winchat winxp自帶局域網聊天
winmsd 系統信息
winver 顯示About Windows 窗口
wupdmgr update
firewall.cpl 防火牆
magnify 放大鏡
sysdm.cpl 系統屬性
sysdm.cpl windows系統安全工具
write 寫字板
tourstart Windows XP 漫遊
utilman 輔助工具管理器
spider 蜘蛛牌遊戲
sysedit 系統配置編輯器
系統文件檢查工具(立即掃瞄) sfc /scannow
系統文件檢查工具(下次啟動時掃瞄) sfc /scanonce
系統文件檢查工具(每次啟動時掃瞄) sfc /scanboot
系統文件檢查工具(返回默認設置) sfc /revert
系統文件檢查工具(清除文件緩存) sfc /purgecache
系統文件檢查工具(設置緩存大小=x) sfc /cachesize=x
cliconfg SQL Client客戶端網絡實用工具
mmsys.cpl 聲音和音頻設備屬性
shutdown 關閉windows
fsmgmt.msc 共享文件夾
wscui.cpl Windows安全中心
control schedtasks 任務計劃
sticpl.cpl 掃瞄儀與相機
ntmsmgr.msc 可移動存儲
intl.cpl 區域的語言選擇
eudcedit TrueType造字程序
control printers 打印機和傳真
powercfg.cpl 電源選項屬性
telephon.cpl 電話與調制解調器選項
odbccp32.cpl ODBC數據源管理器
packager 對象包裝程序
ncpa.cpl /control netconnections 網絡連接
netsetup.cpl 網絡連接嚮導
main.cpl /control mouse 鼠標屬性
winmine 掃雷遊戲
secpol.msc 本地安全設置
control keyboard 鍵盤屬性
IP配置實用程序(顯示連接配置) ipconfig /all
IP配置實用程序(顯示DNS緩存內容) ipconfig /displaydns
IP配置實用程序(刪除DNS緩存內容) ipconfig /flushdns
IP配置實用程序(釋放全部(或指定)適配器的由DHCP分配的動態IP地址) ipconfig /release
IP配置實用程序(為全部適配器重新分配IP地址) ipconfig /renew
IP配置實用程序(刷新DHCP並重新註冊DNS) ipconfig /registerdns
IP配置實用程序(顯示DHCP Class ID) ipconfig /showclassid
IP配置實用程序(修改DHCP Class ID) ipconfig /setclassid
inetcpl.cpl internet屬性
ciadv.msc 索引服務
winver 檢查windows版本號
mplayer2 簡易widnows media player
mspaint 畫圖板
mem.exe 顯示內存使用狀況
compmgmt.msc 計算機管理
wmimgmt.msc 打開windows管理體系結構(WMI)
ntbackup 系統備份與還原
narrator 屏幕「講述人」
netstat -an (TC)命令檢查接口
syncapp 創建一個公文包
sigverif 文件簽名驗證程序
certmgr.msc 證書管理實用程序
iexpress 木馬捆綁工具,系統自帶
access.cpl 輔助功能選項
fsquirt Bluetooth文件傳送嚮導
dcomcnfg 組件服務
timedate.cpl 日期時間屬性
ddeshare DDE共享
control desktop 顯示屬性
desk.cpl 顯示屬性
control.cpl 顯示屬性的外觀選項卡
sigverif 文件簽名驗證
快速查找 findfast.cpl
字體文件夾 control fonts
字體文件夾 fonts
freecell 空檔接龍遊戲
joy.cpl 遊戲控制
explorer-------打開資源管理器
Nslookup-------IP地址偵測器
logoff---------註銷命令
tsshutdn-------60秒倒計時關機命令
lusrmgr.msc----本機用戶和組
services.msc---本地服務設置
oobe/msoobe /a----檢查XP是否激活
notepad--------打開記事本
cleanmgr-------垃圾整理
net start messenger----開始信使服務
compmgmt.msc---計算機管理
net stop messenger-----停止信使服務
conf-----------啟動netmeeting
dvdplay--------DVD播放器
charmap--------啟動字符映射表
diskmgmt.msc---磁盤管理實用程序
calc-----------啟動計算器
dfrg.msc-------磁盤碎片整理程序
chkdsk.exe-----Chkdsk磁盤檢查
devmgmt.msc--- 設備管理器
regsvr32 /u *.dll----停止dll文件運行
drwtsn32------ 系統醫生
rononce -p ----15秒關機
dxdiag---------檢查DirectX信息
regedt32-------註冊表編輯器
Msconfig.exe---系統配置實用程序
rsop.msc-------組策略結果集
mem.exe--------顯示內存使用情況
regedit.exe----註冊表
winchat--------XP自帶局域網聊天
progman--------程序管理器
winmsd---------系統信息
perfmon.msc----計算機性能監測程序
winver---------檢查Windows版本
sfc /scannow-----掃瞄錯誤並復原
taskmgr-----任務管理器(2000/xp/2003
winver---------檢查Windows版本
wmimgmt.msc----打開windows管理體系結構(WMI)
wupdmgr--------windows更新程序
w腳本--------windows腳本宿主設置
write----------寫字板
winmsd---------系統信息
wiaacmgr-------掃瞄儀和照相機嚮導
winchat--------XP自帶局域網聊天
mem.exe--------顯示內存使用情況
Msconfig.exe---系統配置實用程序
mplayer2-------簡易widnows media player
mspaint--------畫圖板
mstsc----------遠程桌面連接
mplayer2-------媒體播放機
magnify--------放大鏡實用程序
mmc------------打開控制台
mobsync--------同步命令
dxdiag---------檢查DirectX信息
drwtsn32------ 系統醫生
devmgmt.msc--- 設備管理器
dfrg.msc-------磁盤碎片整理程序
diskmgmt.msc---磁盤管理實用程序
dcomcnfg-------打開系統組件服務
ddeshare-------打開DDE共享設置
dvdplay--------DVD播放器
net stop messenger-----停止信使服務
net start messenger----開始信使服務
nslookup-------網絡管理的工具嚮導
ntbackup-------系統備份和還原
narrator-------屏幕「講述人」
ntmsmgr.msc----移動存儲管理器
ntmsoprq.msc---移動存儲管理員操作請求
netstat -an----(TC)命令檢查接口
syncapp--------創建一個公文包
sysedit--------系統配置編輯器
sigverif-------文件簽名驗證程序
sndrec32-------錄音機
shrpubw--------創建共享文件夾
secpol.msc-----本地安全策略
services.msc---本地服務設置
Sndvol32-------音量控制程序
sfc.exe--------系統文件檢查器
sfc /scannow---windows文件保護
tsshutdn-------60秒倒計時關機命令
tourstart------xp簡介(安裝完成後出現的漫遊xp程序)
taskmgr--------任務管理器
eventvwr-------事件查看器
eudcedit-------造字程序
explorer-------打開資源管理器
packager-------對象包裝程序
perfmon.msc----計算機性能監測程序
progman--------程序管理器
regedit.exe----註冊表
rsop.msc-------組策略結果集
regedt32-------註冊表編輯器
rononce -p ----15秒關機
regsvr32 /u *.dll----停止dll文件運行
regsvr32 /u zipfldr.dll------取消ZIP支持
cmd.exe--------CMD命令提示符
chkdsk.exe-----Chkdsk磁盤檢查
certmgr.msc----證書管理實用程序
calc-----------啟動計算器
charmap--------啟動字符映射表
cliconfg-------SQL SERVER 客戶端網絡實用程序
Clipbrd--------剪貼板查看器
conf-----------啟動netmeeting
compmgmt.msc---計算機管理
cleanmgr-------垃圾整理
ciadv.msc------索引服務程序
osk------------打開屏幕鍵盤
odbcad32-------ODBC數據源管理器
oobe/msoobe /a----檢查XP是否激活
lusrmgr.msc----本機用戶和組
logoff---------註銷命令
iexpress-------木馬捆綁工具,系統自帶
Nslookup-------IP地址偵測器
fsmgmt.msc-----共享文件夾管理器
utilman--------輔助工具管理器
gpedit.msc-----組策略
For details ,consult:http://www.computerhope.com/msdos.htm
DOS (an acronym for Disk Operation System) is a tool which allows you to control the operation of the IBM PC. DOS is software which was written to control hardware. IDRISI, Atlas*GIS, Microstation, AutoCAD, CPS/PC, and ARC/INFO are, in turn, application software which run under DOS. By this we mean that, although IDRISI, Atlas*GIS, Microstation, AutoCAD, CPS/PC, and ARC/INFO were written to accomplish a single task or application (in this case manipulation of spatially related data), they must use DOS to pursue its work.
DOS can be used for a wide range of tasks far beyond the requirements of this class. You will be able to manage well if you master only a small subset of DOS commands and functions. These relate almost exclusively to file and directory management and are introduced in this handout.
This tip sheet assumes that you have learned how to turn on the PCs as they are configured in room 230 and that you have familiarized yourself with their keyboards (no small task in itself). It also assumes that you understand the meaning of the concept of a file and the elements of a file specification (drive, filename, and extension). The microcomputers you will be using are equipped with two floppy disk drives. The A-drive is the 3.5" (1.44MB) drive and the B-drive is the 5.25" (360KB) drive. The microcomputers also contain a C-drive, a hard disk drive of 130MB or 200MB capacity.
You will quickly find that the best way to learn how to use a computer is through experimentation. That is, once you have learned a command, try some variations until they don't work, then start over. Often there are five or six ways for you to accomplish a particular task. Usually, I will introduce you to only one, leaving it up to you to discover the rest. Don't hesitate to consult the DOS Reference Manual; copies can be found on the bookcase in room 230. Finally, don't be unduly disturbed by error messages. With computers, one of the best ways to learn is by making mistakes.
Most of the common DOS commands you need to use for this class (copy, rename, delete) are available to you in Windows through the Filemanager icon. And, since you can move back and forth between DOS and Windows, it doesn't matter which option you employ. Some commands are faster in invoke in Windows, some in DOS. If you haven't worked with Windows previously, go to the Windows tutorials in the help area.
It is possible to lose files by mistake, although the more you practice the less likely it becomes. For your own peace of mind, it is good practice to make backup copies of your most valuable files on a separate diskette. Store your backup disk in a safe place and don't carry it through a metal detector. Use the COPY command to create the backup.
There is no need to backup every file you create, only the ones in which you've invested much work. Also, prune your backup diskette every week or two using the ERASE command. Backup files which have been made redundant by subsequent additions will simply create clutter on your backup diskette. An effective file naming convention is essential to keeping track of your backups.
To change the default drive, simply type the letter of the your choice. The new default will be listed in subsequent DOS prompts.
Example:
[enter] means that you must press the Enter Key before the format command will execute. [Enter] is required after any DOS command, it is assumed in all commands found below.
Once you have located the directory you want, you may move from directory to directory using the CD command (change directory)
Example:
The COPY command can be used both to copy files from disk to disk or to create a second copy of a file on a single disk. (There are many more uses of the COPY command, but only the basic operation is discussed here.)
Example:
The key to use this command correctly is to remember that the first file specified after the COPY command is the source file, the second is the target:ehp1 file. Thesource is the file to be copied. The target will be the location and name of the new file. If the file name and extension are omitted after the target's drive specification, the new file will have exactly the same name as the source file.
Example:
Note: it is always good practice to us the complete file specifications for both source and target files, Be very sure of yourself before you accept defaults or employ wild-card characters. Otherwise you may end up with some interesting results. Incomplete or incorrect source names may result in errors, such as the command: copy edlin a:myomy.bat. Try it and see what happens.
The DIRECTORY command lists the names and sizes of all files located on a particular disk.
Example:
All the files are listed at the screen, you can stop the display by typing CTRL-BREAK. If you ask for a directory on the A or B drives, be sure there is a diskette in the drive and that the diskette has been formatted. If the drive is empty, or if the diskette is unformatted, the DOS will respond with an error message.
Two little characters, '*' and '?', will make your life with computers much easier. Their use is illustrated below.
Example:
The asterisk is a wild-card character which allows the user to enter only a limited part of a file specification to find a file. It is useful when you wish to locate a group of files with the same filename or the same extension. On other occasions you may have forgotten part of a file specification. You can use '*' in place of the parts of the specification you have forgotten. Similarly, '?' permits wild-card searches keyed to single characters.
Example:
Wild-card characters can be used in combination.
Example:
Experiment with '*' and '?' to improve your ability to find files quickly. These wild-card characters can also be used with several other DOS commands.
The ERASE command deletes specified files.
Example:
IMPORTANT WARNING: This command is easy to use, but it is the most dangerous one you will encounter in DOS (apart form FORMAT). If you aren't careful, you may delete a file which you--or someone else--needs. And, unless you have saved a backup of that file, the erased file is gone for good. For this reason it is good practice to use only complete file specifications with the ERASE command (and to keep backups of your most valuable files). As a safety precaution, never use the wild-card characters '*' and '?' in ERASE commands.
BEWARE: I will rescind your laboratory privileges for a full week if you ever knowingly use either the command: erase c:*.*, or the command: erase *.*. Guess what happens?
Careful file naming can save time. Always choose names which provide a clue to the file's contents. If you are working with a series of related files, use a number somewhere in the name to indicate which version you have created. This applies only to the filename parameter; most of the file extension parameters you will be using are predetermined (or reserved by DOS for certain types of file).
Example:
You must format new disks before using them on the IBM computers. The format command checks a diskette for flaws and creates a directory where all the names of the diskette's files will be stored.
Example:
After entering this command, follow the instructions on the screen. When the FORMAT operation is complete, the system will ask if you wish to FORMAT more diskettes. If you are working with only one diskette, answer N (No) and carry on with you work. If you wish to FORMAT several diskettes, answer Y (Yes) until you have finished formatting all your diskettes.
BEWARE: Executing the format command with a diskette which already contains files will result in the deletion of all the contents of the entire disk. It is best to execute the format command only on new diskettes. If you format an old diskette make sure it contains nothing you wish to save.
This command creates a new directory.
Example:
In some cases, when all attempts to recover from a barrage of error messages fails, as a last resort you can reboot the computer. To do this, you press, all at once, the control, alternate and delete.
BEWARE: If you re-boot, you may loose some of your work--any data active in RAM which has not yet been saved to disk.
The RENAME command permits users to change the name of a file without making a copy of it.
Example:
This command is very simple to use, just remember two points: the file name and extension must be complete for the source file and no drive specification is given for the target. Renaming can only occur on a single disk drive (otherwise COPY must be used).
This command removes a directory. It is only possible to execute this command if the directory you wish to remove is empty.
Example:
If you wish to stop the computer in the midst of executing the current command, you may use the key sequence Ctrl-Break. Ctrl-Break does not always work with non-DOS commands. Some software packages block its action in certain situations, but it is worth trying before you re-boot.