0
@ECHO OFF
SET hr=%time:~0,2%
IF %hr% lss 10 SET hr=0%hr:~1,1%
Set TODAY=%date:~4,2%-%date:~7,2%-%date:~10,4%-%hr%%time:~3,2%%time:~6,2%%time:~9,2%
ECHO.
ECHO.
這將排除文件夾:從壓縮如何排除壓縮主文件中的子文件?
7za.exe a -tzip "C:\Users\Desktop\Downloadbak-%TODAY%.zip" "C:\Users\Downloads\back*" -mx5
ECHO.
PAUSE
它的工作表示感謝!我怎樣才能做到多個文件或文件夾?排除:C:\ Users \ Downloads \ back \ temp和C:\ Users \ Downloads \ back \ temp2和C:\ Users \ Downloads \ back \ temp3? – user3882389
第二種方法只需爲方法1或'/ c:'添加另一個'-x!'開關。 – wOxxOm