Page 1 of 1
Script needed for organizing MP3 cover art
Posted: 07 Nov 2012 18:32
by Stannington
I am in need of a script that will move all files in a certain directory with the extension .jpg or .jpeg (identified as the result of a search in xyplorer) into folders called "covers", created in the same folders the jpgs/jpegs were found in. If two or more Jpg/jpegs are in the same folder, they should be moved to the same "covers" folder. Is this possible? Thanks in advance!
Re: Script needed for organizing MP3 cover art
Posted: 07 Nov 2012 18:45
by highend
Code: Select all
$sourceDir = "D:\temp";
$files = folderreport("files", "r", $sourceDir, "r", , "|");
$files = formatlist($files, "f", "|", "*.jpg|*.jpeg");
foreach($entry, $files, "|") {
$baseFolder = getpathcomponent($entry, "path");
moveto "$baseFolder\covers", $entry, , 2;
}
Modify the $sourceDir variable to fit your needs.
Re: Script needed for organizing MP3 cover art
Posted: 07 Nov 2012 19:03
by Stannington
awesome, thats a lot for your help!