Thanks for you help
amended code to
writefile($auditTrailFile, $auditLog, "a");
but script still will not run, any other pointers?
Regards
Sorting Audio Files Into Folder Script
Re: Sorting Audio Files Into Folder Script
So you indented the whole script as advised? When you say it "will not run", what actually happens? Try this mod that has the necessary changes already applied:
Code: Select all
$moveItem = 0; // 0 = Copy item, 1 = Move item
$menuPosX = 500;
$menuPosY = 500;
$auditLog = "";
$auditTrailFile = "D:\New Music Library\0000 Music Files Library & Information\Xyplorer Music File Audit.txt"; // Set the path to your audit trail file.
$destinations = <<<>>>
D:\New Music Library\New Music Library 2020\Dance
D:\New Music Library\New Music Library 2020\Country
D:\New Music Library\New Music Library 2020\Classical
>>>;
$selected = <get SelectedItemsPathNames>;
end (!$selected), "No item(s) selected, aborted!";
setting "BackgroundFileOps", 0;
foreach($item, $selected, <crlf>, "e") {
$base = gpc($item, "file");
$menu = <<<>>>
$base||$item|4
-
$destinations
>>>;
$menu = regexreplace($menu, "^[ \t]+");
$target = popupmenu($menu, $menuPosX, $menuPosY, 6:=<crlf>, 7:="|");
if (!$target) { continue; }
copyto $target, $item, , 2, 2, 2, 1, 0, 0, 1, 0, 0;
// Log the operation to the audit trail file.
$auditLog .= "Copied: $item to: $target<crlf>";
if ($moveItem == 1) { runret(lax("cmd" /c DEL /F /Q "$item"), "%TEMP%"); }
}
writefile($auditTrailFile, $auditLog, "a");
Re: Sorting Audio Files Into Folder Script
Hi Jupe,
Thank you, now working fine, try to work out what i was doing wrong.
Thanks again much appreciated
Thank you, now working fine, try to work out what i was doing wrong.
Thanks again much appreciated