学习dos技巧100例
- 格式:pdf
- 大小:2.76 MB
- 文档页数:14
Dos 命令学习DOS 命令集锦——最常用命令上课里我们已经学习了不少DOS命令,但那只是很小的一部分,在这课将简要介绍其它一些命令。
首先,在这一节先回忆一下上课的内容,不要学过就忘啊,多使用几次就能记住的。
好,开始吧,看你学得怎么样。
cd改变当前目录sys 制作DOS系统盘copy拷贝文件del 删除文件deltree删除目录树dir 列文件名diskcopy制磁盘edit文本编辑format 格式化磁盘md建立子目录mem 查看内存状况type显示文件内容rd删除目录ren 改变文件名记得多少啊,忘了就去上课看看,下面四个命令是新的,给出命令格式,你自己试试看,学电脑重要的就是摸索。
cls清屏[适用场合]屏幕上太乱了,或是屏幕上出现乱码了,清除屏幕上显示内容但不影响电脑内部任何信息[用法]cls回车move移动文件,改目录名[适用场合]移动文件到别的目录[用法]move [文件名] [目录]移动文件至新目录下move [目录名] [目录名] 改目录名[例子]c:\>move c:\autoexec.bat c:\old移动autoexec.bat文件至old目录下c:\>move c:\config.sys c:\temp移动config.sys文件至old目录下more分屏显示[适用场合]当输出很多一屏显示不下时采用,几乎适合所有命令,尤其是type 等命令时很有用。
使用more时磁盘不能有写保护,也不适合光驱。
[用法]type [文件名] | more 分屏显示文件内容more < [文件名]分屏显示文件内容[例子]C:\>type msdos.w40 | morexcopy拷贝目录和文件[适用场合]在进行连同子目录一起拷贝时很有用,在拷贝大量文件时比COPY命令要快得多[用法]xcopy [文件名] [目录] 将指定文件拷贝到指定目录xcopy [源目录] [目的目录]将源目录连子目录考到目的目录下xcopy *.* [目录] /s将文件与非空子目录拷贝到指定目录其它常用参数还有: v 拷贝后校验,会影响速度e 与s 相似,但即使子目录是空的也会拷贝。
dos内存使用技巧在使用DOS操作系统时,合理管理和优化内存使用是非常重要的。
以下是一些DOS内存使用的技巧。
1. 启动配置文件(config.sys)中的内存管理:在DOS启动时,可以通过config.sys文件手动配置内存管理设置。
其中,使用"devicehigh"命令加载设备驱动程序或内存管理程序可以将它们加载到高内存区,从而释放传统内存。
此外,通过修改"buffers"和"files"等设置,可以适当增加缓冲区和文件数目,提高系统性能。
2. 使用内存优化程序:可以使用第三方的内存优化程序,如RAMBOOST、PKLITE等,通过压缩、加速、整理内存来提高系统性能和释放内存空间。
3. 压缩和打包文件:将经常使用但不常修改的文件打包为一个压缩文件,可以节省磁盘空间。
同时,可以使用压缩工具如LHA、ARJ等将常用文件压缩得更小,再使用时再解压缩,可以减少文件占用的内存空间。
4. 关闭后台应用程序:在DOS环境下,后台运行的应用程序占用内存空间,因此在使用DOS时,可以通过键入"exit"命令来关闭后台运行的应用程序,释放内存。
5. 限制内存占用:某些应用程序可能会占用大量内存,导致DOS系统运行缓慢。
可以通过编辑应用程序的启动文件,限制其使用的内存大小,以减少影响。
6. 减少显示模式颜色深度:减少显示模式的颜色深度(如从256色减少到16色),可以减少显存占用,释放内存。
7. 清理临时文件和缓存:定期清理临时文件夹和浏览器缓存,以释放磁盘空间和内存。
在DOS下,可以使用"del"命令来删除不需要的临时文件。
8. 使用DOS程序的批处理功能:通过编写批处理脚本,可以将一系列命令整合到一个批处理文件中。
这样可以减少每次执行命令时的内存开销,并提高操作效率。
9. 使用低内存占用的应用程序:在DOS环境下,选择那些内存占用较低的应用程序,可以节省内存空间。
分享dos批处理命令的⼀些使⽤技巧(截取字符串)
截取字符串:
set var=10203040
第⼀数字是位置,第⼆个位置是长度,第⼆个位置如果⽆,默认是结尾,第⼀个位置如果是负数,则反⽅向的位置。
位置从0开始
复制代码代码如下:
echo %var:~-4,3%
echo %var:~0%
echo %var:~1%
echo %var:~-2%
替换字符串
复制代码代码如下:
echo %var:0=kkk% ;0替换为kkk
echo %var:10=kkk% ;10替换为kkk
echo %var:20=kkk%
echo %var:*20=kkk% ;20之前包括20字符串都替换为kkk
⽤这种⽅法可以同时执⾏多条命令,⽽不管命令是否执⾏成功
dir c:\*.exe & dir d:\*.exe & dir e:\*.exe
&& Usage:第⼀条命令 && 第⼆条命令 [&& 第三条命令...]
当碰到执⾏出错的命令后将不执⾏后⾯的命令,如果⼀直没有出错则⼀直执⾏完所有命令;
|| Usage:第⼀条命令 || 第⼆条命令 [|| 第三条命令...]
当碰到执⾏正确的命令后将不执⾏后⾯的命令,如果没有出现正确的命令则⼀直执⾏完所有命令;。
八个必须掌握的强大DOS命令一.ping它是用来检查网络是否通畅或者网络连接速度的命令。
作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它所利用的原理是这样的:网络上的机器都有唯一确定的IP地址,我们给目标IP地址发送一个数据包,对方就要返回一个同样大小的数据包,根据返回的数据包我们可以确定目标主机的存在,可以初步判断目标主机的操作系统等。
下面就来看看它的一些常用的操作。
先看看帮助吧,在DOS窗口中键入:ping /? 回车,。
所示的帮助画面。
在此,我们只掌握一些基本的很有用的参数就可以了(下同)。
-t 表示将不间断向目标IP发送数据包,直到我们强迫其停止。
试想,如果你使用100M的宽带接入,而目标IP是56K的小猫,那么要不了多久,目标IP就因为承受不了这么多的数据而掉线,呵呵,一次攻击就这么简单的实现了。
-l 定义发送数据包的大小,默认为32字节,我们利用它可以最大定义到65500字节。
结合上面介绍的-t参数一起使用,会有更好的效果哦。
-n 定义向目标IP发送数据包的次数,默认为3次。
如果网络速度比较慢,3次对我们来说也浪费了不少时间,因为现在我们的目的仅仅是判断目标IP是否存在,那么就定义为一次吧。
说明一下,如果-t 参数和-n参数一起使用,ping命令就以放在后面的参数为标准,比如“ping IP -t -n 3”,虽然使用了-t参数,但并不是一直ping下去,而是只ping 3次。
另外,ping命令不一定非得ping IP,也可以直接ping主机域名,这样就可以得到主机的IP。
下面我们举个例子来说明一下具体用法。
这里time=2表示从发出数据包到接受到返回数据包所用的时间是2秒,从这里可以判断网络连接速度的大小。
从TTL的返回值可以初步判断被ping主机的操作系统,之所以说“初步判断”是因为这个值是可以修改的。
这里TTL=32表示操作系统可能是win98。
CHAPTER 8 DOS另类技巧前面几章我们介绍了怎么样在DOS下解决一些问题,其实DOS还有很多实用的技巧,灵活地运用这些技巧,有时可以起到意想不到的作用。
本章我们就介绍一些DOS的实用技巧。
8.1 DOS环境下巧妙拷贝受损的rm文件经常使用光驱看碟和拷碟的朋友可能遇到过这种情况,可能好不容易弄到一张自己中意已久的碟片,准备拷到电脑里面看个痛快,谁知拷到某一部分的时却怎么也拷不到硬盘里面去了,重新拷贝几次,每次电脑总是在拷备任务完成到百分之九十几(如果只到百分之几,可能是损坏太重了,那可能不能恢复了)的时候告诉我们无法拷贝。
你可能会想到光驱坏了,换光驱再试,如果可以了,当然好,但是很有可能还是失败。
这个时候我们就基本上可以认为这是因为光盘在加工方面上出错了。
有些人可能还想到用超级解霸等软件录制来解决这个问题,也许可以解决一部分的问题,但是如果你还是没办法,千万不要放弃,因为我们还有一个很有用的工具—DOS可以利用。
下面我们就来看看:2⑴首先先进入DOS状态下(纯DOS状态),方法前面我们介绍了,大家可以参照。
⑵然后,如果我们要拷贝的文件是中文名,就需要安装中文支持,方法就是输入:C:\pdos95(当然还可以用其他的方法)如果没有中文支持,显示的文件名则是乱码,我们也就无法拷贝。
接着我们进入光驱所在的盘(这里假设光驱的逻辑盘符是H):C:\CD H:⑶接着,我们就可以用COPY命令来实现我们的目的了,方法如下(我们这里假设光驱中的文件名为movie1.rm,我们要拷贝的目的路径为E:\movie2.rm):H:\copy movie1.rm E: movie2.rm⑷然后我们按回车执行,过一会,我们就会发现光驱开始转动,然后文件就拷贝到了E盘,以后用播放器打开,就可以好好欣赏了。
其实,现在市面上常常有这样子的光盘出现,还有些朋友自己刻录的光盘有有这个问题,大部分的3里面的数据还是是好的,拷不了实际上是在数据结尾时没处理好,Windows可能会认为出错,但DOS则会忽略。
必须掌握的八个DOS命令帮助一,ping它是用来检查网络是否通畅或者网络连接速度的命令。
作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它所利用的原理是这样的:网络上的机器都有唯一确定的IP地址,我们给目标IP地址发送一个数据包,对方就要返回一个同样大小的数据包,根据返回的数据包我们可以确定目标主机的存在,可以初步判断目标主机的操作系统等。
下面就来看看它的一些常用的操作。
先看看帮助吧,在DOS窗口中键入:ping /? 回车,。
所示的帮助画面。
在此,我们只掌握一些基本的很有用的参数就可以了(下同)。
-t 表示将不间断向目标IP发送数据包,直到我们强迫其停止。
试想,如果你使用100M的宽带接入,而目标IP是56K的小猫,那么要不了多久,目标IP就因为承受不了这么多的数据而掉线,呵呵,一次攻击就这么简单的实现了。
-l 定义发送数据包的大小,默认为32字节,我们利用它可以最大定义到65500字节。
结合上面介绍的-t参数一起使用,会有更好的效果哦。
-n 定义向目标IP发送数据包的次数,默认为3次。
如果网络速度比较慢,3次对我们来说也浪费了不少时间,因为现在我们的目的仅仅是判断目标IP是否存在,那么就定义为一次吧。
说明一下,如果-t 参数和 -n参数一起使用,ping命令就以放在后面的参数为标准,比如“ping IP -t -n 3”,虽然使用了-t参数,但并不是一直ping 下去,而是只ping 3次。
另外,ping命令不一定非得ping IP,也可以直接ping 主机域名,这样就可以得到主机的IP。
下面我们举个例子来说明一下具体用法。
这里time=2表示从发出数据包到接受到返回数据包所用的时间是2秒,从这里可以判断网络连接速度的大小。
从TTL的返回值可以初步判断被ping主机的操作系统,之所以说“初步判断”是因为这个值是可以修改的。
这里TTL=32表示操作系统可能是win98。
Windows命令行(DOS命令)教程一.命令行简介命令行就是在Windows操作系统中打开DOS窗口,以字符串的形式执行Windows管理程序。
在这里,先解释什么是DOS?DOS——Disk Operation System 磁盘操作系统在Win9x/Me的开始菜单中的运行程序中键入"command"命令,可进入命令行界面。
在Win2000/NT的开始菜单中的运行程序中键入"cmd"命令,可进入命令行界面。
下面我用讲到的DOS命令都可以在Windows Me操作系统中执行。
那么,我们如何进入命令行窗口?开始——〉运行——〉键入command命令——〉回车进入了命令行操作界面(DOS窗口),在DOS窗口中只能用键盘来操作。
如下所示:\二.符号约定为了便于说明格式,这里我们使用了一些符号约定,它们是通用的:D:\WINNT\SYSTEM32\CALC.EXE三.命令行的输入方法在DOS窗口中通过输入英文命令加回车键这种方式来执行程序。
四.内部命令和外部命令命令行程序分为内部命令和外部命令,内部命令是随装入内存的,而外部命令是一条一条单独的可执行文件。
内部命令都集中在根目录下的文件里,电脑每次启动时都会将这个文件读入内存,也就是说在电脑运行时,这些内部命令都驻留在内存中,用dir命令是看不到这些内部命令的。
外部命令都是以一个个独立的文件存放在磁盘上的,它们都是以com和exe为后缀的文件,它们并不常驻内存,只有在电脑需要时,才会被调入内存。
五.常用命令DOS命令总共大约有一百个(包括文本编辑、查杀病毒、配置文件、批处理等),我们这里详细介绍二十个常用的DOS命令。
先介绍一下通配符的概念。
通配符*和?*表示一个字符串?只代表一个字符注意通配符只能通配文件名或扩展名,不能全都表示。
例如我们要查找以字母y开头的所有文件,可以输入以下命令:dir y*.*;如果要查找所有扩展名为exe的文件,可以用dir .exe。
DOS命令及使用方法DOS(Disk Operating System)是一种操作系统,在计算机历史上具有重要的地位。
它最初由IBM推出,用于早期的个人电脑,特别是IBM PC。
DOS操作系统以命令行界面的形式提供给用户,用户通过输入命令来与计算机进行交互和控制。
以下是一些常见的DOS命令及其使用方法。
1. Dir:显示当前目录中的文件和文件夹。
示例:dir C:\2.Cd:更改当前目录。
用法:cd [drive:][path]示例:cd C:\Windows3.Md:创建新的目录。
用法:md [drive:]path示例:md C:\NewFolder4.Rd:删除目录。
用法:rd [drive:]path示例:rd C:\OldFolder5. Copy:复制文件。
用法:copy[drive1:][path1]filename1[drive2:][path2]filename2 [/V][/Y,/-Y]示例:copy C:\file.txt D:\backup\file.txt6. Del:删除文件。
用法:del [/P][/F] [/S] [/Q] [/A[[:]attributes]] filenames 示例:del C:\file.txt7. Ren:重命名文件。
用法:ren [drive:][path]filename1 filename2示例:ren C:\oldfile.txt newfile.txt8. Type:显示文本文件的内容。
用法:type [drive:][path]filename示例:type C:\textfile.txt9. Date:显示或设置系统日期。
用法:date [/T] [/D[date]]示例:date10. Time:显示或设置系统时间。
11. Chkdsk:检查磁盘或磁盘分区的错误。
用法:chkdsk [drive:][/F][/V][/R][/X][/I]示例:chkdsk C:12. Format:格式化磁盘。
DOS命令学习(从入门到精通)DOS命令学习一、DOS使用常识DOS(Disk Operating System)是一个使用得十分广泛的磁盘操作系统。
常见的DOS有两种:IBM公司的PC-DOS和微软公司的MS-DOS,它们的功能、命令用途格式都同样,我们经常使用的是MS-DOS。
DOS的概况DOS(Disk Operating System)是一个使用得十分广泛的磁盘操作系统,就连目前流行的Windows9x/ME系统都是以它为基础。
常见的DOS有两种:IBM公司的PC-DOS和微软公司的MS-DOS。
它们的功能、命令用途格式都同样,我们经常使用的是MS-DOS。
二、DOS的内部命令DOS的内部命令是进行操作的基础,完毕了对它们的学习就跨进了DOS系统的大门。
内部命令,是指在DOS启动之后,自己主动通过文件导入内存的命令。
在执行这些命令的时候,直接从内存进行调用………1) dir--显示指定路径上全部文件或文件夹的信息它的格式为'dir [盘符:][路径][文件名称] [參数]',比方'DIR E:\FF.M3U'。
2) md(mkdir)--建立文件夹它的格式为'md [盘符][路径]'。
比如'MD TEMP'。
3) rd(rmdir)--删除文件夹格式为'RD [盘符][路径]'。
注意:该命令仅仅能删除空文件夹。
而且不能删除当前文件夹。
4) cd--进入指定文件夹格式为' CD [路径]'。
比如'CD HAPPY'。
注意:仅仅能进入当前盘符中的文件夹。
当中'CD\'为回到根文件夹,'CD..'为回到上一层文件夹。
5) copy--复制文件格式为'COPY [源文件夹或文件] [目的文件夹或文件]',比方'COPY C:\*.COM D:\'注意:使用该命令进行文件拷贝时,目的文件夹一定要存在。
dos命令应用100(DOS command application 100)1, short.*. * can be used. Instead, for example, delete all the files in the current directory.DEL.2, returns the parent directory, which is the higher directoryCD..3, the list of directory files into the text fileDIR /b >filename4. Check the properties of any property in the current directoryMethod one: DIR,Method two: DIR/A5, cancel all attributes of all files in the current directoryATTRIB,If this command is executed in the root directory of C, then use DIR to view, you can see the IO.SYS, MSDOS.SYS and other hidden files.6. Displays all subdirectories in the current directoryDIR/AD7 、 displays the contents of multiple files in successionCOPY * CON *.8, split screen display file contentMethod one: MORE<filenameMethod two: TYPE filename|more9. Change the registration time of disk filesMethod: COPY FilenameNULMethods: two COPY Filename,,10, how to shield the output information of DOS rows?The method is to redirect the screen output to the DOS null device, NUL, for example:COPY MYPROG.EXE A:>NUL11, in the DOS state, directly display D edit WPS file contentCOPY filename.wps CON/B12, append data to a text fileMethod: COPY FilenameCONMethod two: TYPE CON>>filenameAfter the input is complete, press F6 or Ctrl + Z key to finish.13, keyboard fingering exercises or simple screen for Chinese character input practiceCOPY CON NUL14. Print the contents of the keyboard input directly Method one: COPY, CON, PRNMethod two: MORE>PRNMethod three: SORT>PRNWhen the input is complete, press F6 or Ctrl + Z key.15, DOS directly edit the generated fileIn the absence of any editing software (such as EDLIN, EDIT, etc.), you can temporarily edit the file from the keyboard using the following six methods. When the file has been entered, press the F6 key or press Ctrl + Z to save itMethod one: COPY, CON, filenameMethod two: TYPE CON>filenameMethod three: MORE>filenameMethod four: SORT>filenameMethod five: FIND, "XXX", /V/N>filenameMethod six: SORT|FIND, "XXX", /V/N>filenameMethods four or five and six are of special use, readers may wish to try.16, zero byte file generationMethod: TYPE NUL>filenameThe above methods are often used to deal with the disk files that need to be kept secret, and play the role of deleting the contents of files. After the contents have been deleted, they can not be recovered.17, zero byte file copy, you can not use the COPY command, you can only use the XCOPY command.For example: XCOPY, filename1, filename218. Copy all the files and subdirectories in the directoryXCOPY directory name. Drive letter: /S19, how to correctly use the COPY and XCOPY commands?When you associate several files into a single file, you should use the COPY command.Copy a single file smaller than 64KB, using the COPY command. Copies of files larger than 64KB should use the XCOPY command.To copy multiple files, use the XCOPY command.The copies of children of the contents of the folder, you should use the XCOPY/S command. To copy a batch of files to a floppy disk, use the XCOPY/M command.20 when will the XCOPY command be used for the /D switch?Sometimes you need to choose from a directory, build or modify files from one day, and backup them. Use the XCOPY/D command at this point. For example, the following command can be used to copy C: directory that is built or modified after July 1, 1996 to file a:XCOPY C:*.* A:/D:07019621, single floppy copy floppy diskSome PC only equipped with a floppy disk drive, the drive is a drive when and when the use of B disk, if the floppy copy in such a system, use the following command: XCOPYXCOPY A: B:22. tidy up the broken pieces in the floppy disk to improve the efficiencyA floppy disk after establishment and delete files after the operation, some records will not be stored in the form of continuous disk space, causing many pieces of space on the floppy disk, floppy disk read and write operations affect the performance, serious when can cause write fault.To solve the above problems, you can use the COPY command to copy the entire disk, and then keep the files on the new site for continuous storage.23. copies multiple files into multiple floppy disks continuously.First, set the document features of each file with the ATTRIB command:ATTRIBA *.*/SThen use the XCOPY command to insert the new disk after the floppy disk is full, and decide which documents need to be copied and which ones are not copied according to the document characteristics.XCOPY A: /S/M/W.24. use the TYPE command to copy the fileCopy files usually use the COPY command or the XCOPY command. In fact, TYPE also has the use of "copy" files:TYPE filenamel>filename2This method is very effective for copying hidden files. For example: TYPE IO.SYS>A: IO.SYS25. displays files or directories in lowercaseDIR/L26. displays file name and subdirectory name, no display file size and generation time and other informationDIR/B27. make DIR always display the file alphabetically in alphabetical order of the file nameAdd the following command in AUTOEXEC BAT:SET DIRCMD=/OThe file directory created on the 28. column of the dayIf you wish to know how many documents were set up on that day (e.g., October 21, 1996), you can use the following commands to list:DIR|FIND "10211996""29. what would you do if you don't want people to use the DIR command to do directory file listings?Method one: DOSKEY, DIR=You, can, not, use, DIR!Method two: add command line in AUTOEXEC BAT: SET DIRCMD=0The function of this command is to display "File not found" only when the file is displayed with the DIR command. It can play a temporary security role. If you want to display files and directories, specify only specific file names or paths.Method three: SET DIRCMD=DIR>NULWhen the command is executed, then using the DIR command, the output of no file information is also confusing.30. out of all the files in the directory CHKDSK/V|MORE31. how to find files on a disk with multiple directoriesMethod one: CHKDSK/V|FIND file name, in which the file name must be capitalized.Method two: DIR/S file name32. real-time control of printer or newline pageECHO>PRN (wrap)ECHO^L>PRN (page)33. causes the computer to make a sound at the DOS command lineECHO ^GAutomatic response to 34.DOS command questionsFor example:ECHO, Y|DEL, C:ECHO, N|CHKDSK, C: /F35. make the ECHO command display blank linesWhen the ECHO command is followed directly by the space character, the ECHO will display the current information echo state (ON or OFF) instead of returning the blank line directly to the screen. In fact, some of the very simple command formats below can make the ECHO command display blank lines:ECHO ECHO, ECHO ECHO;ECHO[ECHO] ECHO/ ECHO\par36. feed the carriage return to the interactive DOS command with the ECHO commandFor example:ECHO|DATE|FIND "Current date"ECHO|TIME|FIND "Current time"This technique can be used in AUTOEXEC.BAT so that the current date and time information is displayed directly after each boot, so you can continue without pressing the enter key.Thirty-sevenBoot time black boxSometimes it is necessary to record the date and time of each computer use so as to strengthen the management of the machine. You can take advantage of the above technique by adding the following command in the AUTOEXEC.BAT file:ECHO|DATE>>ABCECHO|TIME>>ABCThus, when each computer is started, the date and time are automatically recorded in the file ABC, and the command TYPE ABC is used to view the previous boot date and time.38. automatic statistical command or file running timeHere is a timer TIMETEST.BAT that implements the automatic statistics command or the running time of the file:@ECHO OFFTIME 0COMMAND /C%1%2%3%4ECHO%1%2%3%4 run time is:ECHO|TIME|FIND "time is"@ECHO ONFor example, test the AUTOEXEC.BAT run time:C>TIMETEST AUTOEXEC.BAT in my family.AUTOEXEC.BAT run time is:Current time is 0: 00: 0349Note that AUTOEXEC.BAT has been running for 3.49 seconds. 39. skip or step through the CONFIG.SYS and AUTOEXEC.BAT filesMethod 1: start the computer, the screen appears Starting MS-DOS... When you press the F5 key or the SHIFT key, DOS will skip the CONFIG.SYS and AUTOEXEC.BAT two files and start the machine with the basic environment configuration of the system running.Method two: when the above prompt appears, press the F8 key and answer Y or N one by one through the keyboard to select theexecution command.Method three: add the "number" to the command in the CONFIG.SYS file. Such as DOS =UMS, so that when you execute the command, the selection prompt for [Y, N], lets you choose whether to load the command.40. can you save the DOS startup by waiting for two seconds by pressing F8 or F5?Can. The method is to add the statement SWITCHES=/F to the head of the CONFIG SYS file, and then the same function can be implemented before the Starting MS-DOS appears... Press F8 or F5 when you press.41. single step batch processing fileCOMMAND/Y/C (batch file name)/Y told the DOS switch in the implementation of each line suspended, suggesting that [Y, N] asks the user whether to perform?.42. quickly get help information for the DOS commandMethod one: FAST HELP command nameMethod two: command name /?Method three: command name /H43. easily change the subdirectory nameThe following MOVE command can rename the C: directory to C::MOVE C: C:44. when to move files using the MOVE command?The biggest characteristic of the MOVE command can be listed multiple to move the files in a command line file "," are available. For example, all executable files are moved into the directory in the current directory:MOVE, *.COM, *.EXE, *.BAT45. use the MOVE command to encrypt or decrypt the sub directories simplyEncryption: if the C: Directory uses half Chinese characters for simple encryption, you can execute the command:MOVE C: C (half Chinese characters)Decryption: instead, you can use the MOVE command to combine wildcards * or to change the non recognizable directory name to other names to achieve the purpose of decryption.46. quick access to deep subdirectoriesThe SUBST command can be used to set the drive to replace the second directory path identifier, deep into the deep, thesecond catalog is very convenient. For example, the following command simulates the subdirectory C: M disk:SUBST M: C:Thus, in any directory, you can enter the PRG subdirectory as long as you change the current drive to M.How to cancel the 47. SUBST set the letter?For example, to cancel the disk M in the above example, if the executive order SUBST M: /D.48. the MD command that creates and enters the new directoryThe MD command in DOS can only build subdirectories,When you have finished building it, you can enter it with the CD commandDOSKEY MD=MD $1 $T CD $1The MD command is redefined, and after using MD, the directory is established and the directory is entered synchronously.49. exclude method file listThe DIR command supports wildcards and * * * instead of other characters, but does not provide the ability to exclude the corresponding characters, while using the /V parameter in the FIND command, the list of excluded methods can be easilyimplemented. The following command lists all files other than.BAK files and subdirectories:DIR|FIND/V "BAK", "|FIND/V", "<DIR>""The difference between "50.>" and ""DIR>DIRLIST: if the DIRLIST file exists, the contents of the file will be cleared and new contents entered in the file.DIR>>DIRLIST: if the DIRLIST file exists, append the output data to the end of the file.When the DIRLIST file does not exist, the two are equivalent.51. quick add search pathPATH=%PATH%;%152., the data files and the text file generated by the word processing program can not be executable files, the establishment of automatic search path.The APPEND command can add a set of specified directories to the logical extension of the current directory, thus opening the set of files without specifying the path. After APPEND, you can put more than one directory, so long as it is separated by "...", for example:APPEND, C:: C =: C =: C;53. hide the directory nameBecause the ATTRIB command changes the properties of a directory, the command can be used to hide the directory name. For example, hide the directory C: hide:C: ATTRIBH54. quick delete directory treeWith the DELTREE command, you can quickly delete the specified directory, regardless of the number of subdirectories and directories in the directory, and what attributes are included in the file. For example: DELTREE C:55. prevent accidentally deleting filesThe DEL command is a dangerous command that can be redefined by using the following command to make sure that there is a confirmation when deleting the file:DOSKEY DEL=DEL $1/P56. if you delete some files by mistake, what can you do to restore them in time?The UNDELETE command can be used to restore deleted files. The following commands can recover deleted files from the current directory:UNDELETE *.*/ALLThe first character of the file name returned by this command becomes "REN" and can be changed to the original filename by the "" "" "" "" "command.57., the deletion of multiple file names, no common features of the document, due to difficult to use wildcards, can only be deleted one by one, more troublesome. Is there any other convenient way?Yes。
电脑dos使用技巧DOS (Disk Operating System) 是早期电脑系统的基本操作系统,虽然已经被现代操作系统所取代,但在某些特定的情况下还是会使用到DOS命令。
下面是一些DOS使用技巧,帮助你更好地使用DOS命令。
1. 使用help命令:在DOS中输入"help"命令可以查看所有可用的DOS命令,并且还可以得到每个命令的简要说明。
2. 使用dir命令:dir命令用于列出当前目录下的文件和子目录。
例如,输入"dir /p"可以一页一页地查看当前目录下的文件信息。
3. 使用cd命令:cd命令用于更改当前的工作目录。
例如,输入"cd.."可以返回上一级目录,输入"cd/"可以回到根目录。
4. 使用copy命令:copy命令用于复制文件。
例如,输入"copy file1.txt file2.txt"可以将file1.txt文件复制为file2.txt。
5. 使用del命令:del命令用于删除文件。
例如,输入"delfile.txt"可以删除名为file.txt的文件。
6. 使用ren命令:ren命令用于重命名文件。
例如,输入"ren file.txt newfile.txt"可以将file.txt重命名为newfile.txt。
7. 使用md命令:md命令用于创建新的目录。
例如,输入"md newdir"可以创建名为newdir的新目录。
8. 使用rd命令:rd命令用于删除目录。
例如,输入"rd olddir"可以删除名为olddir的目录。
9. 使用edit命令:edit命令用于编辑文本文件。
例如,输入"edit file.txt"可以打开名为file.txt的文件进行编辑。
10. 使用format命令:format命令用于格式化软盘或硬盘。