批次壓成7z (極致壓縮)的bat寫法
__________________________________
@echo off
set "a=%ProgramFiles%\7-zip\7z.exe"
for %%a in (%*) do if exist "%%~a\" (
"%a%" a -t7z "%%~a.7z" "%%~a\*" -mx9
) else (
"%a%" a -t7z "%%~a.7z" "%%~a" -mx9
)
__________________________________
參考自
這篇
-mx9是極致壓縮
-mx0是僅封存不壓縮