@echo off title 制作CAB格式压缩文 if "%~1" == "" goto :EOF @ECHO 正在初始化请稍候··· @echo .Set MaxDiskSize=CDROM >"%~dp1set.lhl" @echo .Set DiskDirectoryTemplate="." >>"%~dp1set.lhl" @echo .Set CompressionLevel=7 >>"%~dp1set.lhl" @echo .Set CompressionMemory=21 >>"%~dp1set.lhl" @ECHO .Set CabinetNameTemplate="新建压缩包.CAB" >>"%~dp1set.lhl" cd /d "%~1" 2>nul if ERRORLEVEL 1 ( goto file )else ( goto file1 ) :file set hehe=%~dp1 :hehe if "%~1" == "" ( cd /d "%hehe%" goto yasuo) @echo "%~1">>"%~dp1set.lhl" shift goto hehe :file1 cd /d "%1" FOR /F "usebackq delims==" %%i IN (`dir /b /s /a`) DO ( echo."%%i">>"%~dp1set.lhl") move "%~dp1set.lhl" .\ goto yasuo1 :yasuo makecab /f "set.lhl" del setup.inf setup.rpt set.lhl @exit :yasuo1 makecab /f "set.lhl" move @del setup.inf setup.rpt set.lhl move .\新建压缩包.CAB "%cd%.CAB" @exit
制作cab格式压缩文件
发布于 2015年11月12日
归档于 Other