sort files by name and maintain sort order when copying to mp3 player
After two hours of searching with Google and Yahoo, I have not found a good approach to the problem of maintaining proper file order when copying mp3 files from an ext3 directory to a flash-based mp3 player. Contrary to the instruction manual, the player (a Creative MUVO) plays files in the order in which they are written to flash memory, so if I have an audio book with a hundred chapters on an ext3 drive and then copy the book to the mp3 player, the chapters do not necessarily play in proper sequence. The player is inexpensive, and does not support playlists. In searching, I discovered that others also have this problem, but there appears to be no standard Linux utility to solve the problem. But perhaps someone has written such a utility written in Perl? In the Debian archives is a utility named fatsort which addresses this problem, but it necessitates mounting a FAT partition. RLH -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: sort files by name and maintain sort order when copying to mp3 player
On Mon, Mar 24, 2008 at 04:06:15AM -0500, Russell L. Harris wrote: After two hours of searching with Google and Yahoo, I have not found a good approach to the problem of maintaining proper file order when copying mp3 files from an ext3 directory to a flash-based mp3 player. Contrary to the instruction manual, the player (a Creative MUVO) plays files in the order in which they are written to flash memory, so if I have an audio book with a hundred chapters on an ext3 drive and then copy the book to the mp3 player, the chapters do not necessarily play in proper sequence. The player is inexpensive, and does not support playlists. In searching, I discovered that others also have this problem, but there appears to be no standard Linux utility to solve the problem. But perhaps someone has written such a utility written in Perl? In the Debian archives is a utility named fatsort which addresses this problem, but it necessitates mounting a FAT partition. RLH Here is an idea: create a temp. dir: mkdir music_copy copy the files you want to listen to into the temp. dir: cp my_music_file1 my_music_file2 ... music_copy alter the time stamp of these files to suite FAT: (I think 'touch' would do but not sure what FAT uses) then copy the file to your music player The key is to find what value FAT uses: mtime? ctime? Hope this helps. -- | .''`. == Debian GNU/Linux == | my web site: | | : :' : The Universal |mysite.verizon.net/kevin.mark/| | `. `' Operating System| go to counter.li.org and | | `-http://www.debian.org/ |be counted! #238656 | | my keyserver: subkeys.pgp.net | my NPO: cfsg.org | |join the new debian-community.org to help Debian! | |___ Unless I ask to be CCd, assume I am subscribed ___| -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: sort files by name and maintain sort order when copying to mp3 player
On Mon, Mar 24, 2008 at 7:06 AM, Russell L. Harris [EMAIL PROTECTED] wrote: After two hours of searching with Google and Yahoo, I have not found a good approach to the problem of maintaining proper file order when copying mp3 files from an ext3 directory to a flash-based mp3 player. Contrary to the instruction manual, the player (a Creative MUVO) plays files in the order in which they are written to flash memory, so if I have an audio book with a hundred chapters on an ext3 drive and then copy the book to the mp3 player, the chapters do not necessarily play in proper sequence. I had a similar problem with a lousy mp3 player. What I did was copy the files directory by directory. This does not work: cp -r ~/mp3/a_directory /mnt/usb This works and mantains the order: mkdir /mnt/usb/a_directory cp ~/mp3/a_directory/* /mnt/usb/a_directory It is certainly a pain in the ass if there are several directories, but at least it works. The * gets expanded to a file list in alphabetical order. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: sort files by name and maintain sort order when copying to mp3 player
* Kevin Mark [EMAIL PROTECTED] [080324 04:49]: On Mon, Mar 24, 2008 at 04:06:15AM -0500, Russell L. Harris wrote: After two hours of searching with Google and Yahoo, I have not found a good approach to the problem of maintaining proper file order when copying mp3 files from an ext3 directory to a flash-based mp3 player. ... In the Debian archives is a utility named fatsort which addresses this problem, but it necessitates mounting a FAT partition. Apparently I did not/do not understand the way fatsort works, and was trying to do things the hard way. I installed a second small drive, partitioned it, and put on it a vfat filesystem, but fatsort aborts with an error each time I try to run it. Finally, I plugged in my mp3 player, and after demounting it (because it was automounted by Debian), fatsort appears to work perfectly. RLH -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: sort files by name and maintain sort order when copying to mp3 player
On Mon, Mar 24, 2008 at 09:09:22 -0200, Eduardo M KALINOWSKI wrote: On Mon, Mar 24, 2008 at 7:06 AM, Russell L. Harris wrote: After two hours of searching with Google and Yahoo, I have not found a good approach to the problem of maintaining proper file order when copying mp3 files from an ext3 directory to a flash-based mp3 player. Contrary to the instruction manual, the player (a Creative MUVO) plays files in the order in which they are written to flash memory, so if I have an audio book with a hundred chapters on an ext3 drive and then copy the book to the mp3 player, the chapters do not necessarily play in proper sequence. I had a similar problem with a lousy mp3 player. What I did was copy the files directory by directory. This does not work: cp -r ~/mp3/a_directory /mnt/usb This works and mantains the order: mkdir /mnt/usb/a_directory cp ~/mp3/a_directory/* /mnt/usb/a_directory It is certainly a pain in the ass if there are several directories, but at least it works. The * gets expanded to a file list in alphabetical order. What about this: find /your/source/ | sort | while read FILE; do cp $FILE /your/destination/; done Maybe you want to check the sort order before you do the actual copying: find /your/source/ | sort | while read FILE; do echo $FILE; done The sort command has various options to influence the sorting order; it might also depend on your LC_COLLATE setting (I am not sure about this). You can also use the find + sort combination to compile a rough playlist: find /your/source/ | sort playlist.txt Then you can edit this playlist and afterwards copy the files in the same order as they appear in the modified playlist: while read FILE; do cp $FILE /your/destination/; done playlist.txt -- Regards,| http://users.icfo.es/Florian.Kulzer Florian | -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]