I have the following script:
Code: Select all
foreach($folder, folderreport(dirsrel, r, , , , "|"), "|", , ) {
if (foldersize("<curpath>\$folder", <d>, 0)>0) {
$subfolder = folderreport(dirsrel, r, "<curpath>\$folder", , , "|");
moveto "<curpath>\$folder", "<curpath>\$folder\$subfolder\*.*";
delete 0, 0, "<curpath>\$folder\$subfolder\";
$dash = -;
rename b, $folder $dash <#01>, , folderreport(files, r, "<curpath>\$folder", , , "|");
}
}Is there a more elegant way to get the dash to appear in the renaming than how I got it to work?
I tried using single quotes in various areas, but the quotes were appearing in the file name.
Thank you.
XYplorer Beta Club