中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-10 01:46
47,811 主题排行 / 349,897 发帖 / 今日 2 篇 / 48,255 会员排行
DOS批处理 & 脚本技术(批处理室) » 用del删除目录(已解决)
可打印版本  1,002 / 8
第1楼 Wingl83 发表于 2008-10-05 23:22
初级用户 发帖 65 积分 109
用del删除目录(已解决)
想删除C:\Wing\eREAD v6.0文件夹,用




没有错误提示,但C:\Wing\eREAD v6.0文件夹中的子文件夹和C:\Wing\eREAD v6.0文件夹都没有删除掉。

[ Last edited by Wingl83 on 2008-10-12 at 14:59 ]
第2楼 radem 发表于 2008-10-05 23:26
高级用户 发帖 383 积分 691
rd /q/s "\\?\%cd%\目录"
第3楼 HAT 发表于 2008-10-06 00:52
版主 发帖 5,017 积分 9,023
C:\Test>del /?
Deletes one or more files.

DEL attributes]] names
ERASE attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.


C:\Test>rd /?
Removes (deletes) a directory.

RMDIR path
RD path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S
第4楼 forshare 发表于 2008-10-06 15:07
新手上路 发帖 3 积分 8
rd /s /q "C:\Wing\eREAD v6.0"
第5楼 516526966 发表于 2008-10-06 15:28
初级用户 发帖 37 积分 63
rd /s /q C:\Wing\eREAD v6.0
第6楼 23112656 发表于 2008-10-07 05:26
中级用户 发帖 99 积分 220
del是删除文件命令.不是文件夹
第7楼 Wingl83 发表于 2008-10-10 11:22
初级用户 发帖 65 积分 109
4楼和5楼的引号有什么不同呢?
第8楼 tireless 发表于 2008-10-10 11:44
银牌会员 发帖 1,122 积分 2,025
Originally posted by Wingl83 at 2008-10-10 11:22 AM:
4楼和5楼的引号有什么不同呢?

5 楼是错误的。路径中有空格,必须将路径用双引号括起来。
第9楼 Wingl83 发表于 2008-10-12 14:59
初级用户 发帖 65 积分 109
再次感谢楼上的大大
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023