A simple but effective way to generate a command-line with complex parameters quickly and automatically using PeaZip.
Compression format's supported by PeaZip:
7z, arc, bzip2, rar, tar, gzip, pea, QUAD, BALZ, BCM, split, upx, wim, xz, zip, unzip, *paq
(rar = decompression only, all the others are decompression and compression as far as I know).
With "complex parameters" I mean:
- split
- compression level
-...etc...
I created youtube video tutorial here:
https://youtu.be/8J4D3Kw0KME
The code used:
ZIP
Macro pack_notepad
unzip
Macro unpack_notepad
In short:
Compression format's supported by PeaZip:
7z, arc, bzip2, rar, tar, gzip, pea, QUAD, BALZ, BCM, split, upx, wim, xz, zip, unzip, *paq
(rar = decompression only, all the others are decompression and compression as far as I know).
With "complex parameters" I mean:
- split
- compression level
-...etc...
I created youtube video tutorial here:
https://youtu.be/8J4D3Kw0KME
The code used:
ZIP
Macro pack_notepad
str path_7z_in_peazip=F"F:\portableapps\_archivers\peazip\res\7z\7z.exe"
str fullpath_file_to_zip=F"C:\Windows\notepad.exe"
str target_folder=F"C:\ziphere\in this subfolder\"
str target_fullpath=F"C:\ziphere\in this subfolder\notepad.zip"
str other_compression_parameters=F"a -tzip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10 -sccUTF-8 -mem=AES256 -bb0"
str argument=F"{other_compression_parameters} -w''{target_folder}'' ''{target_fullpath}'' ''{fullpath_file_to_zip}''"
run F"''{path_7z_in_peazip}''" F"{argument}"
;THE GENERATED COMMANDLINE BY PEAZIP TO ZIP A FILE:
;"F:\portableapps\_archivers\peazip\res\7z\7z.exe" a -tzip -mm=Deflate -mmt=on -mx5 -mfb=32 -mpass=1 -sccUTF-8 -mem=AES256 -bb0 "-wC:\ziphere\in this subfolder\" "C:\ziphere\in this subfolder\notepad.zip" "C:\Windows\notepad.exe"
unzip
Macro unpack_notepad
str path_7z_in_peazip=F"F:\portableapps\_archivers\peazip\res\7z\7z.exe"
str fullpath_file_to_unzip=F"C:\ziphere\in this subfolder\notepad.zip"
str target_folder=F"C:\unziphere\in this subfolder\"
str other_compression_parameters_1=F"x -aos"
str other_compression_parameters_2=F"-bb0 -pdefault -sccUTF-8"
str argument=F"{other_compression_parameters_1} -o''{target_folder}'' {other_compression_parameters_2} ''{fullpath_file_to_unzip}''"
run F"''{path_7z_in_peazip}''" F"{argument}"
;THE GENERATED COMMANDLINE BY PEAZIP TO UNZIP A FILE
;"F:\portableapps\_archivers\peazip\res\7z\7z.exe" x -aos "-oC:\unziphere\in this subfolder\" -bb0 -pdefault -sccUTF-8 "C:\ziphere\in this subfolder\notepad.zip"
In short: