Code: Select all
$zip = "C:\Program Files\7-Zip\7z.exe";
$sel = quote(get("SelectedItemsPathNames", '" "'));
$cnt = get("CountSelected");
if ($cnt > 1) {
$zipName = "K:\.compress\" . trim(gpc(<curpath>, "base"), ":", "R") . "_<date yyyy-mm-dd>" . ".7z";
}
elseif ($cnt == 1) {
$zipName = "K:\.compress\" . gpc(<curitem>, "base") . "_<date yyyy-mm-dd>" . ".7z";
}
else {
status "No item(s) selected, aborted!", "8B4513", "stop";
end true;
}
$opt = " a -aoa -t7z -m0=lzma2 -mx=9 -mmt8 -mfb=64 -ms=on -bsp1 -bt -bb2 -xr!.bin -xr!.cache -xr!.git -xr!.output -xr!*.log -xr!*.tmp -xr!*.bak";
run """$zip"" $opt ""$zipName"" $sel";
Code: Select all
run "cmd /k ""$zip"" $opt ""$zipName"" $sel";
an executable program or batch file.
How can I enter it correctly so that the terminal stays open?