-   Linux - Hardware (
-   -   Writing files to flash drive in the right order (

andy_g_gray 11-15-2006 10:32 AM

Writing files to flash drive in the right order
I bought myself a cheap mp3 player which is essentially just a flash drive with a jack plug attached.

So I plug it in to the usb port, and "removable drive" pops up on my desktop. I then copy my mp3 files over to the player. So far, so good,


If I copy a folder over, the files within it get copied in seemingly random order. It's not alphabetical, it's not file size, it's not "last modified"...

Like this:

Hard drive - folder a: {01_track1.mp3, 02_track2.mp3, etc}
mp3 player - folder a: {07_track7.mp3, 11_track11.mp3, etc}

The consequence of this is that when I play back an album the tracks are in the wrong order, since my cheap player just plays them back in the order they were written.

I have to admit that this is at worst a minor annoyance, and I usually have the player set to "shuffle" anyhow, but occasionally I have the urge to listen to an album all at once, in the order the artist intended.

So, any way to make sure the files within a folder are written in alphabetical order?

I'm using Nautilus/Gnome/Mandrake 10.0



David the H. 11-15-2006 09:20 PM

Copy the files in a console using the cp command. The wildcard * will read the files in alphanumerically from the first file in the directory.

'cp -v * /sda1/'

Changing /sda1/ to whatever the actual target directory is, if different.

Of course, the files have to be named alphanumerically in the first place, but if these are album tracks they should already be like that.

Edit: d'oh, it doesn't work when you copy the whole directory. The files in the directory don't copy in order this way either. Now I'm stumped too. Sorry.

andy_g_gray 11-16-2006 04:09 PM

Thanks anyway. I have transferred a couple of albums in order by doing one track at a time, but that gets old pretty quickly.

I'd love to know if there is any logic to the order that the tracks get copied.


andy_g_gray 11-26-2006 10:50 AM

Any ideas anyone?

All times are GMT -5. The time now is 06:40 PM.