folder. jpg to artist - album.jpg


#1

My MP3 Collection has one file (folder.jpg) in each album directory for my cover art. How can batch change each "folder.jpg" to "album - artist.jpg"?


#2

You could create a batch file with the export tool that renames the files.
Example:

$filename(rename.txt,ansi)$loop(%_folderpath%,1)ren "%_folderpath%folder.jpg" "$replace($validate(%album% - %artist%,_),\,_).jpg"
$loopend()

The file extension of the exported file must changed to .bat but try it on a few files first and see if it does what you want.


#3
QUOTE (dano @ Nov 29 2006, 16:42) <{POST_SNAPBACK}>
You could create a batch file with the export tool that renames the files.

Example:

$filename(rename.txt,ansi)$loop(%_folderpath%,1)ren "%_folderpath%folder.jpg" "$replace($validate(%album% - %artist%,_),\,_).jpg"
$loopend()

The file extension of the exported file must changed to .bat but try it on a few files first and see if it does what you want.

I am definitely a greenhorn with this program. I made a test folder and tried this. I selected all of the files in one folder (10 mp3 files & 1 folder.jpg file). I highlighted them and hit export. I named the procedure and then hit edit. I cut and pasted the code above into the notepad and deleted the original information. It did not work. Obviously I am clueless.....


#4

Please don't just write "did not work", you must describe the problem exactly.


#5

Sorry....

MP3tag put an excel spreadsheet file on my desktop with one cell that read:

ren "C:\Documents and Settings\Owner\Desktop\TEST\Alan Jackson\A Lot About Livin' and a Little 'Bout Love\folder.jpg" "A Lot About Livin' and a Little 'Bout Love - Alan Jackson.jpg"

The file is named mp3tag.csv

There was no change to the .jpg file that I was trying to change.


#6

As I already wrote, you must change the file extension, so rename the file to mp3tag.bat
You should also select a different config and then this one again to refresh the $filename() values.

You can also change $filename(rename.txt,ansi) to $filename(rename.bat,ansi) but then the batch file will execute immediately!

http://en.wikipedia.org/wiki/File_extension
http://en.wikipedia.org/wiki/Batch_file


#7

It worked like a charm. Thanks for the clarification.


#8

So far, I can only get the code to work on one directory at a time. Anytime I select more than one album of MP3s I get a message stating:

Exported information about 10 files was written to file 'C:\Documents and Settings\Owner\Desktop\mp3tag.bat'.

Exported information about 10 files was written to file 'C:\Documents and Settings\Owner\Desktop\mp3tag.bat'.

This occurs over and over for however many albums I try to rename in a group. It still places displays and runs the .bat file but nothing happens to the folder.jpg folder in each directory.


#9

Do NOT check "One file per directory" in the export window.