in a scenario, where multiple files are selected , and each is compressed into its own <basename>.7z archive,
how to make "while-exists-wait" work correctly ?
When the compression is done , 7zip deleted the compressed item , so the loop should go to the next item.
Currently the Script triggers all selected items at once , not one by one.
Code: Select all
foreach($path,$paths){
$name = gpc($path, "name",,4);
$archive_name = $name . ".7z";
run lax($zip7g a -mx5 -md96m "$archive_name" "$path" -sdel);} //7zip compression starts, deletes selected afterwards
while (exists($path) >= 1 ) // while $path exists , wait , then continue
{wait 250;}Code: Select all
foreach($path,$paths){
goto "$path";
select all;
compress;
while (exists($path) >= 1 )
{wait 250;}
XYplorer Beta Club