中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-07-01 10:30
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » 可与EXT媲美的批文件(原创) 查看 2,507 回复 0
楼 主 可与EXT媲美的批文件(原创) 发表于 2002-11-07 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
积分 1,468
发帖 407
注册 2002-10-21 00:00
23年会员
UID 34
性别 男
来自 广州
状态 离线
这是我自己编的一个批处理文件,跟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.




各位请调试一下,并给点意见!
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
论坛跳转: