批量删除某一类压缩包里的文件

echo off
rem \Erp\Erp.Ui.Web\ClientBin
path=C:\Program Files\WinRAR
setlocal EnableDelayedExpansion 
dir /b /a /on *.xap>>web.txt
cd.>erp.txt
for /f "delims=" %%i in (main.txt) do SET %%i=A
for /f "delims=" %%j in (web.txt) do  if /I not defined %%j echo %%j>>erp.txt
for /f "tokens=*" %%h in (erp.txt) do (
set r=%%h
set tmp=!r:~0,-4!
winrar d -inul -ibck !tmp!.xap *.dll  -x!tmp!.dll
)
del web.txt
del erp.txt
exit

Silverlight程序编译后生成的包里有太多重复的文件,需要减量。

留个网上的备份。

posted @ 2012-05-09 13:43  yjhadn  阅读(1158)  评论(0)    收藏  举报