
[此贴子已经被作者于2005-2-15 19:07:01编辑过]
[此贴子已经被作者于2005-2-14 15:22:37编辑过]
CODE: [Copy to clipboard]@echo off
echo.
echo -----------------------------------------
echo 请输入需要的解压文件的路径注意的是:
echo 本批处理只支持*.RAR,*.zip的文件格式
echo -----------------------------------------
echo.
set /p src=压缩文件所在路径:
if not exist %src% goto _quit
dir %src%\*.rar | find /i ".rar" > nul
if errorlevel 1 goto _findzip
goto _getdst
:_findzip
dir %src%\*.zip | find /i ".zip" > nul
if errorlevel 1 echo There has no *.zip and *.rar file in %src% && goto _quit
:_getdst
cls
echo.
echo -----------------------------------------
echo 请输入解压文件存放的路径
echo -----------------------------------------
echo.
set /p dst=目标路径:
cls
echo.
echo -----------------------------------------
echo 请等待程序正在处理中(处理时间会因为你
echo 给出解压文件大小来决定请按任意键继续)
echo -----------------------------------------
echo.
pause>nul
if not exist %dst% md %dst%
for /r %src% %%R in (*.rar) do md %dst%\%%~nR && rar32 x %%R %dst%\%%~nR\ >nul
for /r %src% %%A in (*.zip) do md %dst%\%%~nA && pkunzip %%A %dst%\%%~nA\ >nul
CHCP 936 >NUL
cls
echo.
echo -----------------------------------------
echo 操作成功!!如果你需要删除压缩文件请输入Y
echo 如果你想把文件目录也删除的话请输入all!!
echo -----------------------------------------
set /p sure=请输入您的选择:
echo %sure% | find /i "y" > nul
if errorlevel 1 goto _all
for /r %src% %%R in (*.rar) do del /f /q %%R
for /r %src% %%B in (*.zip) do del /f /q %%B
goto _quit
:_all
echo %sure% | find /i "all" > nul
if errorlevel 1 goto _quit
rd /q /s %src%>nul:_quit
for %%I in (src dst sure) do set %%I=
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |