|
3#
楼主 |
发表于 2009-6-10 13:04:51
|
只看该作者
谢谢超版,已测试过了,不过有一句得修改一下
for /f "delims=*" %%i in ('dir/ad/b/s %%a:\*od_cache_data*') do rd /s/q %%i
就是蓝色部分,那个目录名改成 *vod_cache* 这样就能搜索到所要求的目录,
rd /s/q %%i 这句要改成 rd /s/q “%%i” 加上一个双引号,就能把下面这些带空格的路径名下的目录删除了。
c:\Documents and Settings\Administrator\Application Data\gvod_cache_data
c:\Documents and Settings\Administrator\Application Data\thunder_vod_cache
c:\Documents and Settings\Administrator\Application Data\vod_cache_data
c:\Documents and Settings\All Users\Application Data\gvod_cache_data
c:\Documents and Settings\All Users\Application Data\thunder_vod_cache
c:\Documents and Settings\All Users\Application Data\vod_cache_data
c:\Program Files\gvod_cache_data
c:\Program Files\thunder_vod_cache
c:\Program Files\vod_cache_data
修改后的批处理如下:
@echo off
set drv=c d e f g h i j k l m n o p q r s t u v w x y z
for %%a in (%drv%) do (
for /f "delims=*" %%i in ('dir/ad/b/s %%a:\*vod_cache*') do rd /s/q "%%i"
)>nul 2>nul
pause
|
|