The called script that removes the sub-directories and deselects my original directories is as follows:
Code: Select all
msg "Remove all Sub-Directories and their files of selected Folder(s)?", 1;
foreach($folder, "<get SelectedItemsNames |>") {
if (exists("<curpath>\$folder") != 2) { continue; }
$m = report("{Modified yyyy-mm-dd hh:nn:ss}", "<curpath>\$folder");
$c = report("{Created yyyy-mm-dd hh:nn:ss}", "<curpath>\$folder");
$a = report("{Accessed yyyy-mm-dd hh:nn:ss}", "<curpath>\$folder");
setting "BackgroundFileOps", 0;
$foldersRoot = listfolder("<curpath>\$folder", , 2);
if (listfolder("<curpath>\$folder", , 2) != "") {
delete 1, 0, $foldersRoot;
timestamp m, $m, "<curpath>\$folder";
timestamp c, $c, "<curpath>\$folder";
timestamp a, $a, "<curpath>\$folder";
}
}
status Complete!;