some time ago I cobbled together a not-quite-small script for optimizing my Ex-iPod which now became an actually useful media player after I installed Rockbox software on it.
Since this is a harddisk player, I thought it might be a good idea to get some order into my files. Of course, I wanted to keep albums closely together, without moving too many files after adding or removing some files.
To do this, I decided to put the WMP ID file (if there is one) at the beginning of the disk, to speed up whatever Windows Media player does with it, followed by a very small gap, and thenn all the files rockbox uses directly (including the databases, which are loaded into RAM on boot anyway, just like the folders. No big problems here.)
Then, after another pretty small gap, there will be playlists, if they are stored in a folder called "Playlists" or "Wiedergabelisten" (I'm German, and WMP wanted to use this folder name) or their extension is WPL (Windows Media Player Playlist) or m3u (some universal format which basically just stores file paths. I don't know the official name).
Then MyD will create a slightly larger gap and start with the music directory (has to be called "Music").
In that directory, it will first look for all direct subfolders of "Music" (presumably artists) NOT atarting with a letter, sorted ba name, followed by a gap.
Then, 26 zones, one for each letter, will follow, of course each of them with a gap, and sorted by name.
After the music files are processed, it will move the rockbox updater utility (if it is stored on the player) behind the music, since it doesn't need to be read quickly usually, and after that, it will put all the other files on the drive, if there are any.
Now, after all this talk, here's my script:
 It just came to my mind that I should warn everyone about a few things:
- The script will take a looooooooong time when you run it the first time.
- Apparently, iPods are not made for continuous operation. The device gets really hot ater some time. Nothing happened so far, but I suggest some breaks, in case Apple didn't deem it useful to turn off an overheating hard drive.
- Hopefully not related to the heat thing: Some files become marked as unmovable and will remain in place, so that's another reason to start over occasionally
- Last time I checked, the rockbox software seemed unable to charge the battery when connected via USB. It's probably better to use the one useful feature of the original firmware (Disk mode - available by pressing select+play during boot) for optimization. This way, you can charge your battery and get the added benefit of no locked files in your rockbox folder