1
Script / 7-zip profiles vs cmd line 7-zip?
« on: February 07, 2025, 15:57:14 »
I was looking at using a script that calls the packer function & uses 7-zip max compression, but cannot see how to specify or change the command for MAX on 7-zip specifically in the packer profiles, I cannot get the 'external' button to work for an external packer either. Duh not activated yet

Running Internal zip (MAX) doesn't give me the smallest possible output.
Is this functionality present or do I just call the external 7-zip?
I got as far as this, where I wanted to compress selected subfolders:-
Any help on how to call max compression appreciated


Running Internal zip (MAX) doesn't give me the smallest possible output.
Is this functionality present or do I just call the external 7-zip?
I got as far as this, where I wanted to compress selected subfolders:-
Quote
@var $zipPath = "C:\Program Files\7-Zip\7z.exe";
@var $scanDir = "C:\path\to\the\directory";
@function CompressFolder($folderPath, $folderName) {
@var $zipFileName = "$folderName.7z";
MC.Run CMD="EXTRACT" TARGET="$folderPath" SOURCE="\"$zipFileName\"" USERCONFIRMATION="NO" ARCHIVE="$zipPath" ARGUMENTS="a -r \"$zipFileName\" \"$folderPath\\*\"";
}
@function ScanFolders($currentDir) {
@var $dirs = MC.Filesystem.ListDirs(path="$currentDir");
@for $dir in $dirs {
@var $folderName = MC.GetValue(PATH="$dir", INDEX="basename");
@if ($folderName == "a" || $folderName == "b") {
CompressFolder($dir, $folderName);
}
ScanFolders($dir);
}
}
ScanFolders($scanDir);
Any help on how to call max compression appreciated
