Then you have to debug it yourself...
Add this line (indented, please!)
just over
Code: Select all
$filesRoot = listfolder("<curpath>", , 1);
and run it again. Where exactly does it hang now?
For all, another major speedup (but only do this if you files / folders don't have "# or [" in their names)...
Code: Select all
$filesInSubfolders = formatlist(replacelist($allFiles, $filesRoot, "", "|"), "dents");
The replacelist is incredible slow if the number of files is growing...
Replace it with:
Code: Select all
$filesInSubfolders = formatlist($allFiles, "dentsf", $sep, regexreplace("!$filesRoot", "([#[])", "[$1]"));
1000 files in the root folder and 1000 files in a subfolder:
Old version: Minutes
New version: Under one second