rd/rmdir
嚯嚯 发表于 2020-06-22 16:29浏览次数:
rd和命令rmdir命令在MS-DOS中的作用是删除一个目录。如果要删除其中包含文件或目录的目录,必须使用deltree命令。如果运行的是Microsoft Windows 2000或Windows XP,请使用/ S选项。
The rd and rmdir commands remove empty directories in MS-DOS. To delete directories with files or directories within them, you must use the deltree command. If you are running Microsoft Windows 2000 or Windows XP, use the /S option.
目录:
1 rd/rmdir 运行系统环境
2 rd/rmdir 的语法
3 rd/rmdir示例
rd/rmdir 运行系统环境
Windows 95
Windows 98
Windows xp
Windows vista
Windows 2000
Windows 7
Windows 8
Windows 10
MS-DOS 2.0 - 6.0, 6.2, 6.22
Windows NT
Windows ME
rd/rmdir 的语法
Windows XP和更高版本的语法
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
/S
|
除目录本身之外,还删除指定目录中的所有目录和文件。它用于删除目录树。
|
/Q
|
安静模式,不要问是否可以使用/ S删除目录树。
|
Windows 95、98和ME语法
移除(删除)目录。
RMDIR [drive:]path
RD [drive:]path
Windows XP and later syntax
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
/S
|
Removes all directories and files in the specified directory in addition to the directory itself. It is used to remove a directory tree.
|
/Q
|
Quiet mode, do not ask if ok to remove a directory tree with /S.
|
Windows 95, 98, and ME syntax
Removes (deletes) a directory.
RMDIR [drive:]path
RD [drive:]path
rd/rmdir示例
rmdir c:\full
如果目录包含文件或文件夹,您将收到“目录不为空”。错误消息,如果您尝试使用rd或rmdir。如果要删除已满的目录,请使用deltree命令,或者如果您使用的是Windows 2000或更高版本,则将下面的示例代码与/ s开关一起使用。
rmdir c:\test
删除测试目录(如果为空)。
rmdir c:\test /s
Windows 2000,Windows XP和更高版本的Windows可以在提示永久删除测试目录以及子目录和文件的情况下使用此选项。添加/ q开关将取消提示。
rmdir c:\full
If a directory contains files or folders, you will receive "The directory is not empty." error message if you try to use rd or rmdir. If you want to delete directories that are full, use the deltree command or if you're using Windows 2000 or later, use the example code below with the /s switch.
rmdir c:\test
Remove the test directory, if it's empty.
rmdir c:\test /s
Windows 2000, Windows XP and later versions of Windows can use this option with a prompt to permanently delete the test directory, as well as subdirectories and files. Adding the /q switch would suppress the prompt.