One way to delete the mp3 cover image files on the N900

Filed under N900

Hi all.

As I mentioned before, the n900 has a very annoying thing, when you drag & drop mp3 folders to your .sounds folder, it takes all the images there(which are usually the album cover art) locks them down and puts them in the image library.

Here is one way to delete those files on a windows machine:
Connect your N900 via cable in “Mass storage mode”, check what is the n900’s directory path, in my case H:
Open a python shell and type(again, depends on where you put those mp3 folders, in my case in the “.sounds” folder):

##———————————–##

import os, glob

##–This will delete all the jpgs under .sounds/mp3(in my case)
for i in glob.glob(’H://.sounds//*//*.jpg’):
=> os.chmod(i, 666)
=> os.unlink(i)

##–This will delete all the jpgs under .sounds/mp3/anotherFolderDown(in my case)
for i in glob.glob(’H://.sounds//*//*//*.jpg’):
=> os.chmod(i, 666)
=> os.unlink(i)

##–This will delete all the jpgs under .sounds/mp3/anotherFolderDown/anotherFolderDown(in my case)
for i in glob.glob(’H://.sounds//*//*//*//*.jpg’):
=> os.chmod(i, 666)
=> os.unlink(i)

##———————————–##

=> (means Tab or 4 spaces)

There are MANY other ways to set it, this is just one :) .
The best thing to do it a loop that goes through the folders and if it finds a jpg file just chmod it and unlink it.
This is just the most transparent way to do it :P .
And… of course, you can do the same directly from within the device, since it Python build into it already :)

Hope it helps, later…

Comments are closed.