IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Tool to delete folder.jpg, AlbumArtSmall.jpg, desktop.ini, ..., help needed
pone
post Feb 6 2012, 12:04
Post #1


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



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

These files are:
desktop.ini
AlbumArtSmall.jpg
AlbumArt_{7E518F75-1BC4-4CD1-92B4-B349D9E9248B}_Large.jpg
AlbumArt_{7E518F75-1BC4-4CD1-92B4-B349D9E9248B}_Small.jpg
Folder.jpg


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:
http://www.dotnetperls.com/7-zip-examples -> 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.



EDIT:
Or can this be done with the standard Windows CMD Commands?
I don't know much about that things. Any help appreciated.
http://ss64.com/nt/
http://ss64.com/nt/del.html

This post has been edited by pone: Feb 6 2012, 12:24
Go to the top of the page
 
+Quote Post
ohrenkino
post Feb 6 2012, 13:05
Post #2


Member


Group: Full Members
Posts: 4379
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.61d



ZITAT(pone @ Feb 6 2012, 12:04) *
Or can this be done with the standard Windows CMD Commands?
I don't know much about that things. Any help appreciated.
http://ss64.com/nt/
http://ss64.com/nt/del.html

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.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 13:30
Post #3


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(ohrenkino @ Feb 6 2012, 13:05) *
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.
Go to the top of the page
 
+Quote Post
ohrenkino
post Feb 6 2012, 14:10
Post #4


Member


Group: Full Members
Posts: 4379
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.61d



ZITAT(pone @ Feb 6 2012, 13:30) *
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%


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 14:42
Post #5


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



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
Code:
QUELLTEXT
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?

This post has been edited by pone: Feb 6 2012, 14:45
Go to the top of the page
 
+Quote Post
ohrenkino
post Feb 6 2012, 14:47
Post #6


Member


Group: Full Members
Posts: 4379
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.61d



ZITAT(pone @ Feb 6 2012, 14:42) *
Perfect. Thank you very much!

Always a pleasure!
ZITAT(pone @ Feb 6 2012, 14:42) *
\s stand for subfolders, right?...Is that correct?

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.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 14:55
Post #7


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



Another releated question:

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


EDIT:
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)?

This post has been edited by pone: Feb 6 2012, 17:38
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 6 2012, 19:20
Post #8


Member


Group: Full Members
Posts: 4794
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (pone @ Feb 6 2012, 14:55) *
... 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:...).

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\*.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.

DD.20110206.1920.CET

More to play with ...

@FOR /F "usebackq tokens=*" %p IN (`@DIR /A:-D/B/S/-P *.jpg;*.png;*.bmp;*.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.

DD.20120206.2020.CET

This post has been edited by DetlevD: Jul 22 2012, 18:24


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 6 2012, 19:33
Post #9


Member


Group: Full Members
Posts: 4794
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (pone @ Feb 6 2012, 14:55) *
... Is there a way to display the deleted files in Window's Recycle Bin (Papierkorb)?

No.
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 ...
http://ss64.net/westlake/nt/

DD.20120206.1933.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 19:45
Post #10


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(DetlevD @ Feb 6 2012, 19:20) *
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\*.jpg" >"%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.

DD.20110206.1920.CET


Thanks

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.
Perfect!
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?

This post has been edited by pone: Feb 6 2012, 20:02
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 6 2012, 21:02
Post #11


Member


Group: Full Members
Posts: 4794
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (pone @ Feb 6 2012, 19:45) *
... 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.

[german]
Ö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.
[/german]

Good luck!

DD.20120206.2103.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 21:24
Post #12


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



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!

This post has been edited by pone: Feb 6 2012, 21:28
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 21:42
Post #13


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



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?

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


This post has been edited by pone: Feb 6 2012, 21:50
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 6 2012, 21:48
Post #14


Member


Group: Full Members
Posts: 4794
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (pone @ Feb 6 2012, 21:42) *
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?

Set the hidden attribute only for the Thumbs.db.

DD.20120206.2149.CET

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

DD.20120206.2158.CET

This post has been edited by DetlevD: Feb 6 2012, 21:57


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
pone
post Feb 6 2012, 21:51
Post #15


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(DetlevD @ Feb 6 2012, 21:48) *
Set the hidden attribute only for the Thumbs.db.

DD.20120206.2149.CET


Ok, so I set the system attribute back with:
attrib -s thumbs.db /s
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 14:00