Step:
Go to: File > Options > Tags. In the field "Restrict incoming files to:" add .jpg (or/and .gif , *.bmp , whatever you need). When you now load a directory into Mp3tag, jpg files are also listed.
Step:
Use the Filter (F3) with %_extension% IS jpg or
%_extension% MATCHES (jpg|jpeg|png|gif|bmp)
Step:
Use the Tag - Filename Converter with simply: folder
How do you define 'intelligent'?
I would simply do it manually using the TotalCommander displaying the complete foldertree in "Zweigansicht' with Filter '*.jpg'. Then pressing [Ctrl+A] [Ctrl+M], then putting in the filename 'folder', then [Alt+S]. Ready.
For repeated mass renaming of picture files I would recommend to use IrfanView.
It has a good working batch section, can also read in a text list file.
Or do it with a commandline batch file.
Search the forum, I assume there are examples how it can be done what you want to do.
For example see post #2 in this thread for an interesting approach of mis-using Mp3tag.
This looks like a task for the operating system.
You could proceed as follwos:
open a command shell (cmd.exe)
navigate to the top-most folder.
type in the command
dir /b /s *.jpg > pictures.txt
This will create a text file that has a list of jpg in all subdirectories.
An entry may look like this:
c:\music\band\a-ha\eastsun.jpg
c:\music\band\abba\arrival.jpg
open the text file with an editor that has the ability to search for the (in word this is ^p)
replace the with " folder.jpgren "
the two entries from the example will look like this:
c:\music\band\a-ha\eastsun.jpg folder.jpg
ren c:\music\band\abba\arrival.jpg folder.jpg
ren
delete the superfluous "ren "after the last entry and insert one in the first line.
save the text file with the extension cmd (not txt)
in the command shell type in
pictures.cmd
and all the addressed jpgs will be renamed.
thanks for all the suggestions. It seems that this requirement is not a normal "feature" of MP3Tag
Maybe I should suggest it as a new feature...
Also many thanks to pone. This is what I meant with "intelligent" solution... not having to install another tool since MP3Tag is so versatile, it surely should be able to rename a few jpg files somehow...
With pone's solution you don't even have to use the filter function in step 2 since jpg files don't have ID3 tags and so they will always appear at the bottom or the top of the list (if sorted by album or any other non-filename tag).
Has anyone here compiled a few best-practice Actions? I looked through the FAQs and the forum but found nothing...
Regards s0liver and thanks to all of you again for all the help.
I have new solution for this old problem. It is similar to ohrenkino's solution above, but it works only in the the directory of the current file and you don't have to work with text editors once you have set up the tool.
You have to create a .bat file and a Mp3tag Tool. To create a bat file, create a .txt file and rename it to .bat
bat file:
Name: C:\Users<username>\AppData\Roaming\Mp3tag\rename picture to folder.bat
Code:
Mp3tag tool:
Name: Rename picture to Folder
Path: C:\Users<username>\AppData\Roaming\Mp3tag\rename picture to folder.bat
Parameter: "%_folderpath%"
The bat file will only rename one picture of every filetype. It looks first for a file with "front" in the name, than for a file with "cover". If both not found, the alphabetically first file will be renamed to folder.
I have included several filetypes to have one tool for all files. But you can also split this into different tools or use only jpg files. No filetype will be changed and only files with the specified extentions (.jpg / .png / .gif / .bmp) will be renamed.
I'm new to the cmd operations. So please correct me if I made a mistake somewhere. But it seems to work perfectly from a few test I have done.
If you keep the extension ".jpg" you can simply replace it by the asterisk. This would save you the bother of thinking of all the possible file type extensions:
So you could simply use
Actually, I am not quite sure whether really all bitmaps are allowed. I always thought that only jpg and png were accepted as covers. But I could be wrong.
(The gifs at least because there was a licence fee connected to this format. So in many cases this was only taken as format if compuserve was the originator).
If you keep the extension ".jpg" you can simply replace it by the asterisk. This would save you the bother of thinking of all the possible file type extensions:
Actually, I am not quite sure whether really all bitmaps are allowed. I always thought that only jpg and png were accepted as covers. But I could be wrong.
(The gifs at least because there was a licence fee connected to this format. So in many cases this was only taken as format if compuserve was the originator).
Replacing the extention with an asterisk would rename mp3 files with "front" or "cover" in the filename. This would not be a wanted behaviour.
Allowed and accepted by whom or what? I guess I don't have many bmp files as cover pictures, but sometimes there are scans in this format. I included folder.jpg and folder.gif in the search pattern for foobar, and it has no problem with bmp files. Mp3tag doesn't display them in the preview window, but that doesn't matter for the bat file.
I transfomed the tool into an export and that works without problem. With a fixed path where to export the .bat file and %_folderpath% being written into the export file for CMD. After exporting, I click "Show exported file" ("Soll die Exportdatei jetzt angezeigt werden?"), and the bat file runs. Nice.
But: the goal of that was to make an action, which peroforms the export, wich creates & performs the .bat file. (Because action are quicker to perform via the menu bar, which is not possible for exports and tools.)
And there is the problem: If a export is performed vie an action, Mp3tag doesn't ask i the file show be displayed. So the bat file doesn't run automatically. Can this be change?
Hmm ... you can create the command file in a special folder, just created for this purpose.
Use a tool or service to watch this folder.
When the watcher has detected any change in this folder or has detected an incoming file, then run the command file.
I am not aware of any free and good working tool out there.
This would need some time to discover a useful one.
Thanks. I guess that would work. But I don't want to have another tool which is always running in the background.
It's not that big deal. I will use the bat file as a tool within Mp3tag. Transforming it to an action would have made it a bit easier to use for my personal workflow. But I can live with the tool. Maybe Florian picks up my proposal in that other topic of building tools & export into the menu bar...
Here is a small demo package how a simple folder watcher could work ...
20120207.DD.WDC.Demo.1.0.zip ( 78.95K ) Number of downloads: 2
DD.20120207.1702.CET
Here is a small demo package how a simple folder watcher could work ...
... now including sleep.exe and waituntil.exe, when needed.
Here is a much simpler one line batch i used to copy all my cover.jpg files to folder.jpg files in calibre. . should work for mp3 folders as well. You could also just try ren to rename them.
For Windows (using Command Prompt)
Open Command Prompt and navigate to your Calibre library's root folder.
Run the following command:
batch
FOR /R . %i IN (cover.jpg) DO COPY "%i" "%~dpi\folder.jpg"
FOR /R . %i IN (cover.jpg) iterates through all subdirectories (starting from the current directory .) and finds files named cover.jpg.
"%i" is the full path to the found cover.jpg.
"%~dpi\folder.jpg" constructs the destination path, keeping the drive and path (%~dpi) of the source file and adding the new filename folder.jpg.