Board logo

标题: [已解决]怎样批量删除文件夹? [打印本页]

作者: tireless     时间: 2008-7-11 10:55    标题: [已解决]怎样批量删除文件夹?

比如目录中有文件夹 “tireless 1” “tireless 2” “tireless 3” “tireless 4” ...

我试了在命令提示符下执行 rd tire*,但不成功。

[ Last edited by tireless on 2008-7-10 at 06:51 PM ]
作者: bat-zw     时间: 2008-7-11 11:08
在当前目录执行:
CODE:  [Copy to clipboard]
@echo off&for /f "delims=" %%i in ('dir /s /ad /b tire*') do rd /q /s "%%i"
[ Last edited by zw19750516 on 2008-7-11 at 11:13 AM ]
作者: tireless     时间: 2008-7-11 13:59
哇,好麻烦。。试了,出错:
此时不应有 %%i。
作者: pusofalse     时间: 2008-7-11 14:03
批处理中。。。不是CMD中运行。。
作者: tireless     时间: 2008-7-11 14:08


  Quote:
Originally posted by pusofalse at 2008-7-10 06:03 PM:
批处理中。。。不是CMD中运行。。

原来是这样。。

--------------------------------
无语,为什么删除文件可以用通配符,删除文件夹却不能

[ Last edited by tireless on 2008-7-10 at 06:09 PM ]
作者: HAT     时间: 2008-7-11 14:17
CODE:  [Copy to clipboard]
rm -r tire
GNU的rm.exe支持统配符

rm.exe
http://rthost.fam.cx/cndos-up/img/590.zip
作者: tireless     时间: 2008-7-11 15:19
好多命令行工具啊,121个。

GNU utilities for Win32
http://unxutils.sourceforge.net/

  Quote:
Download:
by http: UnxUtils.zip
by ftp: no FTP mirror at the moment

latest updates (after 14-04-03):  UnxUpdates.zip

注:将下载链接复制到下载工具中进行下载;红色部分是更新。

[ Last edited by tireless on 2008-7-11 at 02:37 AM ]
作者: HAT     时间: 2008-7-11 17:21
http://gnuwin32.sourceforge.net
最好到官网下载
作者: tireless     时间: 2008-7-11 21:10


  Quote:
Originally posted by HAT at 2008-7-10 09:21 PM:
http://gnuwin32.sourceforge.net
最好到官网下载

找不到下载链接
作者: HAT     时间: 2008-7-11 21:26
try this one.

http://sourceforge.net/project/showfiles.php?group_id=9328




欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) Powered by Discuz! 2.5