Index SD Card?!

Thanks for the responces!
Yes, i already considered the memory problem. But i thought i'd just get it to work this way first, and see more or less how many files the Arduino can handle before it runs out of memory. And if i can't find any better solution i would try to index the sd card and save it to a index file on the sd card itself. But i would like to try to avoid writing to the sd card, to avoid problems when suddently removing the sd card.
I don't want to have to preload an index file to the sd card so the arduino can handle it, because that would make it to complicated to just add/remove/rename a few tracks. It's fairly essential that the arduino can manage the files itself.
I'm using an Arduino Uno right now because it makes it easy to test (since the shield is for an uno), but i may end up using an Arduino Mega, or maybe even an Arduino Due (although a Due may not even need the mp3 decoder) if there is no other way to handle the data efficiently enough.
My plan is to take a simple Standalove Audio Amplifier, and be able to play music from an sd card (without having to connect it to some kind of source).
The shield just buffers 32bytes of the file, that get sent by the arduino. The SD card is only accessed by the arduino. I'm using this shield because i wanted to have full access to header information of the track currently being played.
Anyhow, it's fairly important that it can deal with an sd card with randomly named mp3 files and no index files of any kind...
I could try and only index the short names, but that way i couldn't display the name of the actual mp3 file being played.

Is anyone able to write a function that would index the sd card (regardless of if the memory would be sufficient), or could anyone at least point me in the right direction?
I think i can handle all the rest myself, for now i only need the short and long paths of all files (not only mp3 files, and not only the files in the root).

Thanks for your time! :slight_smile: