Istvan Gabor wrote:
Hello all:
This question maybe OT but is related to linux:
I've got an MP3 player that plays mp3 files in a strange order, not alphabetically. I've mounted the player and tried different listings by ls. I found that the player plays the songs in the order of the inode numbers:
ls -li|sort
command gives the same order as the player plays the files.
Now I have two questions:
1. The player's filesystem (SD card) is vfat. Are there inode numbers in a vfat filesystem?
2. How could I change these numbers of the files so that their order would correspond to the alphabetical names of the files?
I deal with this problem on my mp3 player all the time, since I listen to audio books, and the order of the files is very important. :-) I create a fresh subdirectory [per book] and copy the files to it in the order I want them to play. If I have to change anything, I create a new subdirectory and start over. When you start deleting and adding files, the order gets all screwed up. Normally a "cp *mp3 /media/usbdisk/subdir/" from bash works fine. Graphical file managers may or may not work the same way. I wrote a small shell script that checks to double check the order in the directory is alphabetical: #!/bin/sh set -x cd "${1:-dirname}" || exit set +x ls -1 > /tmp/bsdir1 ls -1U > /tmp/bsdir2 echo echo Checking difference: echo diff -u /tmp/bsdir[12] rm -f /tmp/bsdir[12]
There is a small program in Suse that can help with this. I really don't remember the name of it, I'll check it tonight, but it is something like TAG...
It lets you edit the file attributes of audio files, including song name, album, date, genre, and play order (by number). Easy to use, at least in KDE. Sorry I don't remember the name of it, but will send that later when I get to my Suse box.
"id3v2" is a shell command that views/changes/adds ID3 tags in mp3 files. - BS