[NTLUG:Discuss] True order of files in a directory.
Steve Baker
sjbaker1 at airmail.net
Thu Aug 25 23:45:28 CDT 2005
Here's a puzzler.
My son has an el-cheapo USB MP3 player - it uses USB filing system
for storing music tracks. It allows you to put files into
directories - so you can put tracks into albums and albums into
collections by artist - and artists into collections by genre.
This all works.
However, he was puzzled that when he does an 'ls' of the gizmo
from his Linux box, the order of the albums and tracks is
alphabetical - but the order they appear to be when viewed on
the MP3 player itself seems random.
Well - we all know that 'ls' (and most other Linux tools) sort
file listings into alphabetical order.
The MP3 player evidently does not. I can see the 'true' order
of the files from Linux using 'ls -f' (which turns off sorting)
and when I do that, Linux sees the same random ordering that
the MP3 player does...so this is a good theory.
So - the question is, how can my kid get the albums (and more
importantly, the tracks within the albums) into the right order
on the MP3 player?
The obvious way is to wipe the USB drive clean and copy the files
onto the player in the order they should be played in.
But this is a major pain to do because if you delete one song,
the player will put the next song you create into that slot in
the directory - resulting in horribly misplaced files.
What we *really* need is a tool to rearrange the order of files
*physically* in the directory of the USB drive.
Does anyone have any insights into how to do this nicely?
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net> WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
More information about the Discuss
mailing list