中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-04 08:10
48,038 主题排行 / 350,123 发帖 / 今日 0 篇 / 48,251 会员排行
DOS开发编程 & 发展交流 (开发室) » 可与EXT媲美的批文件(原创)
可打印版本  2,599 / 0
第1楼 Lydong 发表于 2002-11-07 00:00
元老会员 发帖 407 积分 1,468 来自 广州
可与EXT媲美的批文件(原创)
这是我自己编的一个批处理文件,跟EXTRACT.EXE 放在同一个目录,可以达到与EXT同样的效果,而且可以展开您所要解压的CAB文件。
格式:EXT2


EXT2.BAT 内容
===============

@echo off
if "%1"=="/?" goto help
if "%1"=="/h" goto help
if "%1"=="" goto help

goto ext
:help
echo.
echo Extract *.cab files ...
echo eg:
echo EXT2 {source path * } {destination path }
echo EXT2 {source path *\*.cab } {destination path }
echo EXT2 {source file *.cab } {destination path }
echo EXT2 {source file * } {destination path }
echo EXT2 {source file *.cab } ; ----- extract files to directory "ext"
echo EXT2 {source file * } ; ----- extract files to directory "ext"
set ext=HELP
echo EXT2

goto end
:ext
: =====================EXT====================
if "%2"=="" goto NoPath
if exist %3 goto WantExtCab
if exist %1.cab goto ExtCab
if exist %1 goto ExtFullName


:ExtCab
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=ExtCab
goto end


:ExtFullName
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=ExtFullName

goto end


:WantExtCab
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=WantExtCab

goto end


:NoPath
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l ext %%I >nul
if exist %1 for %%I IN (%1) do extract /y /e /l ext %%I >nul
set ext=NoPath

goto end


:error
echo.
echo Not exist %1 files or Invalid directory ...
echo.
goto end


:end
echo.
ECHO OK! ^_^
echo extract file %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13
echo.




各位请调试一下,并给点意见!
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023