这是我以前写的。就“拿来主义”一把吧! 后面注明了[外]的是外部命令。
一. 基本命令列表 base command list:
1. d: ----改变驱动器盘符 change drive
2. dir ----文件列表 list file
3. cd ----进入目录 come to a directory
4. copy ----拷贝文件 copy a file or many files
5. type ----显示文本文件内容 show file conment
6. ren ----文件改名 rename a file
7. del ----文件删除 delete a file
8. cls ----清屏 clear the screen
9. xcopy ----某目录下一组文件的拷贝 copy a group of files in a directory [外]
10.attrib ----显示或改变文件属性 show or change file''s charckter [外]
11.edit ----文本编辑器 a editor for write a file [外]
12.chkdsk ----磁盘检测 check a disk [外]
13.tree ----显示目录树 list directory tree
14.format ----磁盘格式化 format a disk for dos [外]
15.md ----建立一目录 make a directory
16.rd ----删除目录 delete a directory
17.deltree ----删除目录和它的所有子目录 [外]
delete a directory with all it''s sub directory
18.time ----显示系统时间 show system time
19.prompt ----改变提示符 change the prompt
二. 基本命令用法 base use-way:
1. d: ----c:>d:a: ----到A:盘 change to drive a:
2. dir ----c:>dir[d:][path][filename[.ext]][/p][/w]
eg: c:>dir a: ----A:盘文件列表 list files in disk a
c:>dir l*.* ----文件名第一字母为"L"的所有文件列表
list files whose first letter is "l"
c:>dir/w/p ----按宽屏分页显示文件
list files as wide ( 5 files in a line)
and page
****** c:>dir , ----显示所有属性文件列表
****** c:>dir/a ----显示所有属性文件列表
3. cd ----c:>cd [d:][path]
eg: c:>cd yln ----进入YLN目录
come to directory named as "yln"
c:yln>cd.. ----退回上级目录
come back pre-directory
c:>cd yln\tool ----进入yln\tool子目录
come to multiple(deep layer) directory
c:yln\tool\cd\..\game ----转到上级目录后,
再进入game子目录
turn to another directory
4. copy ----c:>copy [d:][path]file1[.ext] [d:][path]file2[.ext][/a][/v]
eg: c:yln\tool>copy qe.exe a: ----拷贝文件qe.exe 到a:盘
copy qe.exe to disk a
c:yln\wps>copy xue1.wps+xue2.wps xue3.wps
---- 拷贝文件xue1.wps和xue2.wps 为另一文件
xue3.wps
let xue1.wps and xue2.wps 合成 a new
file named as xue3.wps
c:yln\wps>copy xue1.wps xue01.wps ----拷贝文件xue1.wps为
一新文件xue01.wps
copy xue1.wps as new
name
5. type ----c:>type [d:][path]filename[.ext][|more]
eg: c:yln\wps>type hlp.txt|more ----逐页显示文件hlp.txt
show hlp.txt when a page
full then pause and wait
you press any key continue
6. ren ----c:>ren [d:][path]file1[.ext] file2[.ext]
eg: c:>ren a.bat b.bat ----文件a.bat改名为b.bat
a.bat rename to b.bat
7. del ----c:>del [d:][path]filename[.ext]
eg: c:>del c:\yln\wps\xue1.bak ----删除文件xue1.bak
del the file named xue1.bak
8. cls ----c:>cls ----清屏
clear the screen
9. xcopy ----c:>xcopy [d:][path] [d:][path] [/s][/e]
eg: c:yln>xcopy \wps /s/e ---- 拷贝wps目录下所有文件,包括子目录
和空目录
copy the directory "wps" and all
it''s sub-directory enclude empty
sub-directory
10. attrib ----c:>attrib[+h][-h][+r][-r][+s][-s][+a][-a][d:][path]filename
eg: c:yln\wps>attrib +h +r xue1.wps----设定文件属性为隐含,只读
11. edit ----c:>edit [d:][path][filename][.ext]
eg: c:>edit \yln\wps\xue3.txt ----编辑文件xue3.txt
12. chedsk ----c:>chkdsk [d:] ----检查d:驱动器中的盘
13. tree ----c:>tree [d:] ----显示d:中的盘的目录
14. format ----c:>format [d:] ----格示化d:中的盘 for dos
15. md ----c:>md directory-name ----建立新目录
16. rd ----c:>rd directory --删除一个目录
eg: c:>rd yln ----删除yln目录,但yln一定要是个空目录才
能删除
17. deltree ----c:>deltree [d:][directory][/y]
eg: c:>deltree yln/y ----删yln目录,不询问是否确认删除
[很危险,慎用]
18. time ----c:>time ----询问系统时间并修改,用回车放弃修改
19. prompt ----c:>prompt $p$g ----设定提示符为d:\current-path>