Tool to delete folder.jpg, AlbumArtSmall.jpg, desktop.ini, ...


Some of my album folders have a set of files which I believe is created by Windows Media Player.

These files are:

These files are hidden files and hidden files. I can't see them in the Windows Explorer. But they show up in Mp3tag Albumart Preview Window, and they can't be overwritten by Mp3tag.
That's anoying, because I have set Mp3tag to store covers as folder.jpg, and thw WMP folder.jpg has always 200x200 pixel, which is a bit too small for my liking, and often a completely wrong picture of another album which has only a similar title.

What I do now is: open the folder with 7-Zip, there I delete the files, and after that I run my web sources again to get proper covers.

Can someone show me how to make a tool for Mp3tag which deletes these files automatically?
At least Folder.jpg, AlbumArtSmall.jpg & desktop.ini, which have always the same filenames. The other two AlbumArt_{...}_....jpg files have always different filenames, so the tool would need some wildcards which i more difficult i guess. Would be ok if these files keep there.

I already open the folder with 7-Zip with a simple tool:
Path: C:\Program Files\7-Zip\7zFM.exe
Parameter: "%_folderpath%

And it seems that 7-Zip is capable of using command lines. I found an tutorial here which mentions a command to delete files: -> Example "e" command
But I can't figure out how to transform this into a command line parameter for Mp3tag.

Using something different than 7-Zip would be also ok. That's just the first idea which came to my mind.

Or can this be done with the standard Windows CMD Commands?
I don't know much about that things. Any help appreciated.


Yes, it can be done.
You simply create yourself a text file and enter the following:

attrib -h -s . /s
del /s folder.jpg
del /s albumart*.jpg
del /s desktop.ini

then save the text file and rename it with the extension .bat

Execute it and all the files that you do not like should be gone.


How do I specifie this to a certain folder? Only the files in the folder of current file in Mp3tag should get deleted. I don't see any reference to %_folderpath% in your code.


Oh yes:
please add the following line at the beginning before the attrib command:
cd %1

The command line should then feature the full path to the batch-file (e.g. mybatch.bat) and hand over the current path:
c:\myfolder\mybatch %_path%


Perfect. Thank you very much!

For everyone who wants to try that, I have now:

bat file:
Name: C:\Users<username>\AppData\Roaming\Mp3tag\delete wmp files.bat

cd %1
attrib -h -s *.* /s
del /s folder.jpg
del /s albumart*.jpg
del /s desktop.ini

Mp3tag tool:
Name: Delete WMP Albumart Files
Path: C:\Users<username>\AppData\Roaming\Mp3tag\delete wmp files.bat
Parameter: "%_path%"

\s stand for subfolders, right? I can leave that away to avoid accidental deletion of folder.jpg files form more folders if I accidentally executed the tool from a folder which holds different subfolders with different albums. Is that correct?

Datei mit Dateiname folder.jpg existiert bereits

Always a pleasure!

Yes (although it should be /s).
Actually: it should not do any harm to set hidden and system files (in the music folder) back to the status of normal files ...
But that is why it's an optional parameter.


Another releated question:

Is there a command which lists all folder.jpg files with the attribute "hidden" in all subfolders of my music directory?

Allright, I'm getting slowly into this CMD thing. This command does the job:
dir folder.jpg /a:h /b /s

Next question:
Is there a command to load all the directories of these listed files into Mp3tag? Or, if not possible, the jpg files themselve (for that, I would allow jpg files for Mp3tag via Tools>Options>Tags>Restrict incoming files to:...).

More question:
Why %_path% and not %_folderpath%?
Is there a way to display the deleted files in Window's Recycle Bin (Papierkorb)?


Output from DOS commands can be redirected to text file using the right angle bracket, for example ...
DIR >%TEMP%\dirout.txt
will create a text file in the user's temp folder
DIR >%USERPROFILE%\Desktop\dirout.txt
will create a text file on the user's desktop
DIR >>dirout.txt
will append output to existing text file.

DIR /A:-D/B/S/-P "M:\My Music<!--coloro:#ff0000-->*.jpg" >"%USERPROFILE%\Desktop\List of image files.txt"

CD /D "M:\My Music" & DIR /A:-D/B/S/-P .jpg;.png;.bmp;.gif >"%USERPROFILE%\Desktop\List of image files.txt"

So far at this moment ... will see how to get only the folderpathes of the folders, which contain image files, into text file, so that Mp3tag can open the text file and load all related files from these folders.


More to play with ...

@FOR /F "usebackq tokens=*" %p IN (@DIR /A:-D/B/S/-P <!--coloro:#ff0000--><span style="color:#ff0000"><!--/coloro-->*<!--colorc--></span><!--/colorc-->.jpg;<!--coloro:#ff0000--><span style="color:#ff0000"><!--/coloro-->*<!--colorc--></span><!--/colorc-->.png;<!--coloro:#ff0000--><span style="color:#ff0000"><!--/coloro-->*<!--colorc--></span><!--/colorc-->.bmp;<!--coloro:#ff0000--><span style="color:#ff0000"><!--/coloro-->*<!--colorc--></span><!--/colorc-->.gif) DO @ECHO %~dp%~pp>>"%USERPROFILE%\Desktop\List of folders.txt.m3u"

... will give a list of folders (sorry, not unique entries), which can be load by Mp3tag.

And keep in mind, that there are still problems with special characters like Umlaut characters between the limited DOS codepage and the windows unicode interface.



The DOS command DEL cannot delete into the Recycle Bin.
Once the DEL command has deleted a file, you can assume, that the file's data is lost forever.

Try Recycle.exe from ...




dir folder.jpg /a:h /b /s >dirout.txt
give me a list of all pathes of hidden folder.jpg.
getting folderpathes without filename from that is easy with notepad++, where I can use regular expressions.
But how do I load this folders into Mp3tag?
When I rename the .txt file into .m3u, I can load all directories into Mp3tag.
But these are too much folders to care for new covers for all of them. I guess I will delete all albumart*.jpg files and change the attribute of the folder.jpg files.
Is it save to delete all desktop.ini files in my music folders?


I think this is a question of personal taste and the look and feel how to use the Windows user interface.
Perhaps the folders will loose their window-like appearance, icons and such things???
I do not know for sure, because I banned such visual distractions from my machine since years.
There are a few folders, which contain a desktop.ini, but not in the data area, where I want speedy access and detailed overview.
I did just a search scan on my machine and detected about 300 desktop.ini files, not so much at all, mostly located in system temporary folders.

Hmm, did you speak of not to see all files in the explorer view?
This is a question of setting up the Windows explorer from simple user view to expert view.

Öffne im Explorer den Dialog "Explorer/Extras/Ordneroptionen/Ansicht/Dateien und Ordner".
Ändere die Einstellungen ...
[X] Inhalte von Systemordnern anzeigen
[] Erweiterungen bei bekannten Dateitypen ausblenden
] Geschützte Systemdateien ausblenden
Versteckte Dateien und Ordner
(X) Alle Dateien und Ordner anzeigen
[X]Vollständigen Pfad in der Adresszeile anzeigen
[X]Vollständigen Pfad in der Titelleiste anzeigen ???
Achtung ...
Wichtige Entscheidung treffen, ob diese eine Ordneransicht für alle Ordner übernommen werden soll.
Schaltfläche "Für alle übernehmen" drücken oder nicht.

Ändere Explorer Ansicht: zeige Details, zeige Statusleiste.
Rechtsklick auf Spaltenüberschrift: Attribute einschalten.

Good luck!



i know that windows options. this was more a genereal case of getting off some files i don't need, and most of all: avoiding the problem that Mp3Tag won't overwrite hidden folder.jpg files.

i just did it
deleted all desktop.ini & albumart*.jpg

and for future hidden folder.jpg's i have now the tool for quick deleting.

thanks for your help ohrenkino & DetelevD!


Hm, jetzt seh ich all dies thumb.db Datei. Die will ich aber nicht löschen.

attrib +h +s thumbs.db /s

Stellt das den Normalzustand wieder her?

ups, i switched to German.
anyway. I performed that command. Can't do any damage i think.


Set the hidden attribute only for the Thumbs.db.


Not correct.
Set the hidden and system attributes for the Thumbs.db should be right.



Ok, so I set the system attribute back with:
attrib -s thumbs.db /s


Sorry I was too fast with my advise.
Set Hidden and System attributes for the Thumbs.db.



ok, i will set it back again :smiley: