Script needed for organizing MP3 cover art

Discuss and share scripts and script files...
Post Reply
Stannington
Posts: 2
Joined: 07 Nov 2012 18:11

Script needed for organizing MP3 cover art

Post 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!

highend
Posts: 14942
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script needed for organizing MP3 cover art

Post 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.
One of my scripts helped you out? Please donate via Paypal

Stannington
Posts: 2
Joined: 07 Nov 2012 18:11

Re: Script needed for organizing MP3 cover art

Post by Stannington »

awesome, thats a lot for your help!

Post Reply