[NBLUG/talk] FAT32 multiple file copy order

Scrappy Laptop scrappylaptop at yahoo.com
Fri Jan 15 14:50:03 PST 2010


Bob, I realize that this does not resolve the problem of order-written-to-disk, but I believe it is the more correct way of having an mp3 player sort and play your music as you wish it to be played.  To be honest, I cringe at depending on methods such as order written.

Solution:
Create an .m3u playlist so that the order of the files on the disk is irrelevant.  A .m3u is just a text file and the creation is very scriptable.


Simple method (add sorting as needed): 

find [MP3_directory_name] -name "*.mp3" -print > playlist.m3u


Fancy method:

(shamelessly cribbed from http://www.linuxforums.org/articles/howto-create-and-edit-m3u-playlists_381.html)

Step 1:  Assuming you have already connected your media device to your computer and have mounted it, browse to the root directory of the device.
Note: The placement of the playlist may be different for your device. I suggest that you find out (somehow) where the playlists for your device are stored.

Step 2:  Create a new text file with a m3u extension. The name of the file will be the name of the playlist.

Step 3 : Open the m3u file in your favorite text editor. m3u files have a few rules:
1. Every song is on a new line.
2. Use the # character to comment a line.
3. Caps sensitive.

The first line of the file should be
#EXTM3U
This just tells it that there will be extra info as well as the song.

Step 4
For every song, you will need 2 lines of code:

   1. #EXTINF:260,08-Duel.mp3
   2. MUSICBONDBond - Bond8-Duel.mp3

Line 1 is the extra info for the song.
The number is the length of the song in seconds. After that comes the title of the song, usually this is the same as the file name. This information will be displayed when the song plays.
Pay attention to the spaces and punctuation marks, they're important!

Line 2 is the absolute path to the song. In the root of my device is a folder MUSIC which stores all the music files. From there I organized it in folders by band and then by album. In purist terms it would be pathtosongName of Song.mp3.
Please note, this assumes that the m3u is in fact in the root of the device. If it is somewhere else, then you will need to provide the path from where the m3u file is to the song. If the m3u file and the song belong to different parent directories I think (I'm not sure) that you can provide the path to the song from the root.

At the end of the file (after the last song) leave a blank line. This way the device knows that that is the end of the file.

Step 5
Save the file and you're done!





--- On Wed, 1/13/10, Bob Blick <bobblick at ftml.net> wrote:

> From: Bob Blick <bobblick at ftml.net>
> Subject: Re: [NBLUG/talk] FAT32 multiple file copy order
> To: "General NBLUG chatter about anything Linux, answers to questions, etc." <talk at nblug.org>
> Date: Wednesday, January 13, 2010, 12:20 PM
> 
> On Wed, 13 Jan 2010 00:51:00 -0800, "Matthew Brooks" said:
> > This is a common issue in the way that many heads from
> a couple of
> > manufacturers implement reading fat32 off USB. Pioneer
> and Sony are the
> > main
> > ones I've heard grumblings about.
> 
> > besides mp3s in the directory, I much prefer:
> > 
> > for i in *.mp3; do cp $i /path/to/disk/; sync; done
> 
> Thanks for the suggestion. I'd still be stuck with new
> folders being out
> of order with all the others. Maybe I need to keep a copy
> of the thumb
> drive on my computer so I can delete all files from the
> thumb drive and
> do a full copy each time I want an update - and write a
> little perl
> program that goes through and creates all the directories
> first, and
> then populates them with files. Not exactly quick and
> spontaneous, but
> perhaps the only way to get everything to both play and
> display in
> order.
> 
> Believe it or not I am much happier with this problem than
> I was with my
> fancy Kenwood with its graphic display and dual rotary
> encoders. That
> thing was basically unusable and I almost had a wreck once
> because of
> the distraction while trying to turn down the volume when
> it had popped
> into "set subwoofer trim level". Not that the Pioneer is a
> breeze to
> navigate, but it's much easier.
> 
> Cheerful regards,
> 
> Bob
> 
> -- 
> http://www.fastmail.fm - Access your email from home
> and the web
> 
> 
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
> 


      



More information about the talk mailing list