February 26th, 2014, 12:38 AM
Audio file ordering in flash drive
There are various mp3/wma players in China using SD/TF cards as the storage. The audio files can be selected by the order of them been copied to the flash drive no matter what's the full file path. (enter 8 or 08 or 008 or ... will load the 8th audio file been copied or moved into the flash drive)
My questions are:
(1) What's the file attribute determines the order above?
(2) Is there a Perl script can reset the total linear order according to the file name (dictionary order of the files, ignoring the file path order), assuming there is no duplicated file name?
(3) Roughly speaking, how difficult to write such a script?
Thanks for your help!
February 26th, 2014, 02:57 AM
If you use the Perl sort function, this will default to lexicographical order (i.e. more or less what you call dictionnary order), it is fairly easy to produce a list of file in the order you are looking for. But I don't know enough about what you want to do exactly to figure out how easy the rest will be. If the idea is just to copy the files in a given order, then it should be quite easy.
February 26th, 2014, 03:20 AM
I have the same problem in your 1st questions
Originally Posted by elimqiu
February 26th, 2014, 11:54 AM
I did a google search and there are a lot of free utility programs that will do this for these devices already.
Here's a writeup from one :
I'm sure the same thing could be easily replicated in perl, but I don't have a device to test.
Last edited by keath; February 26th, 2014 at 12:36 PM.