TheQwerty: loading files on list takes a lot of time if you consider that each verification cycle must run within milliseconds, the required time for another processed file to join the list thus increasing group's total count. Not to mention the source folders are scattered away.
zer0: totally agree. The first snippet shows it in details dealing with a total of 21.387 substitutions.
...
Posted script is not bad code, is just a sample on how inconvenient the late of replace() can be. I could simply equalize all separators and the timing magically gets faster.
Problem is that AFAICR delete(), copy(), copyas(), moveto(), copyto(), backupto() all require (hardcoded!) "|" (pipe as separator) which will require conversion to/from <crlf> as human friendly reports and logs must contain <crlf>ed lists.
Far away from ideal I currently must count operations which statistically gives me a number of files varying from ~8k and ~19k each 105000 verification cycles when I should instead distribute them the closest possible to the FAT limit of ~23k, equally, beautifully and organized, which is unfair.
Remote locations (ie files that are not visible in current list) should be granted a way to provide us feedback with their current total of items (folders, files, folders and files) recursively or not.
Measuring and its control is a key concept on computing...
Script'ed move operations should allow moving all listed files at once like when you just select a folder containing a huge amount of files and drag it somewhere else in no time inside the current partition of course.
Below script is aimed to help on moving a huge amount of files:
Code: Select all
$refdt = now("");
$files = folderreport("files", "r", , "r", , "<crlf>");
$rfdtPROC1 = now("");
$cntMXproc1 = gettoken($files, count, "<crlf>");
$rfdtPROC1A = now("");
$lst = formatlist($files, "f", "<crlf>", "*.scd");
$rfdtPROC2 = now("");
foreach ($tk, $lst, "<crlf>") { moveas "*.?", "D:\Tests\MOVED\", "$tk"; }
$rfdtPROC3 = now("");
$cntMX = gettoken($lst, count, "<crlf>");
$refdate = now("");
$msg = "Count: $cntMX. Total: $cntMXproc1.<crlf 2>Start: $refdt.<crlf>Proc 1 = '$rfdtPROC1' (after folderreport, total)<crlf>Proc1A = '$rfdtPROC1A' (after count of total tokens)<crlf>Proc 2 = '$rfdtPROC2' (after formatlist by EXT)<crlf>Proc 3 = '$rfdtPROC3' (after MOVEAS)<crlf 2>Finished: $refdate. (after count of filtered list)";
writefile("X Timing MoveAs.txt", "$msg<crlf>", a);
text $msg;
Test results:
Code: Select all
Count: 21385. Total: 21386.
Start: 22/11/2011 12:04:24.
Proc 1 = '22/11/2011 12:04:26' (after folderreport, total)
Proc1A = '22/11/2011 12:04:26' (after count of total tokens)
Proc 2 = '22/11/2011 12:04:26' (after formatlist by EXT)
Proc 3 = '22/11/2011 12:19:35' (after MOVEAS) - 15 minutes!!!
Finished: 22/11/2011 12:19:35. (after count of filtered list)