Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2005



Tip: Looking for answers? Try searching our database.

manipulating file order

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T-n-T - 17 Nov 2005 16:12 GMT
I hope someone can help me, I believe this is probably a simple
question for someone knowlegable. I am using the transcript scripting
language to transfer files to and from  an memory  card. I have
complete my app except one troubling piece. I want to manipulate the
file order in which my mp3 player reads the files. It does not read
them by any visible order. (eg. date modified, name, etc.) I believe it
is probably reading it from the desktop DB? it reads them in the order
I put them on the card. Can someone point me in the right direction?

Thank you,
      Lildog
l0ne (on mac) - 17 Nov 2005 16:46 GMT
> I believe it
> is probably reading it from the desktop DB?

It likely isn't.
What model of MP3 player are you talking about? Many support M3U
playlists (which are essentially text files with one song per line in
the order you wish, barring extensions), or may be reading them in
filesystem order, which you cannot guarantee to be well-defined in
general.

- ∞
T-n-T - 18 Nov 2005 16:15 GMT
It is a MyMusix Player from radio shack. No m3u support. It is a very
basic player. I am on an imac running 8.6 and was limited in choice.
But that is no matter, What is the filesystem order? Can I manipulate
the file order? On a windows machine it uses Windows media player to
make the playlist.

Here is the big problem, I have alot of mp3 cds my files are on and
wanted to copy the files from them. Most of the "jukebox" apps require
the files on my drive.

I am just so frustrated trying to play the files in a specified  order.
Thank you for you help....

> > I believe it
> > is probably reading it from the desktop DB?
[quoted text clipped - 7 lines]
>
>  - ∞
l0ne (on mac) - 18 Nov 2005 18:54 GMT
[Hmmmm... not a programming-related question, so I'm putting [OT] up
there.]

> What is the filesystem order?

The FS order is the actual internal order of files on the drive. You
cannot (in general) guarantee this order to be a specific one on most
filesystems.

> On a windows machine it uses Windows media player to
> make the playlist.

Then it _does_ have a way to specify a playlist order. Have you tried
loading a playlist on it with Windows and then looking at the files on
the drive?

> Here is the big problem, I have alot of mp3 cds my files are on and
> wanted to copy the files from them. Most of the "jukebox" apps require
> the files on my drive.

Get a drive, then. Cost per GB is ridiculously low these days :D

> I am just so frustrated trying to play the files in a specified  order.
> Thank you for you help....

I'm not sure this is the best place for this kind of question, anyway.

- ∞
T-n-T - 18 Nov 2005 22:50 GMT
Ok,  I managed to squeeze a bit more info from the manufacturer. It is
the FAT volume directory. Can this be accessed and altered without
erasing and rewritting files?

> [Hmmmm... not a programming-related question, so I'm putting [OT] up
> there.]
[quoted text clipped - 24 lines]
>
>  - ∞
Reinder Verlinde - 18 Nov 2005 23:23 GMT
In article <1h68n3p.pwkegj969ad2N%millenomi@gmail.com>, l0ne (on mac)
<millenomi@gmail.com> wrote:

> T-n-T <lildog@donobi.net> wrote:
>
[quoted text clipped - 6 lines]
> cannot (in general) guarantee this order to be a specific one on most
> filesystems.

> Ok,  I managed to squeeze a bit more info from the manufacturer. It is
> the FAT volume directory. Can this be accessed and altered without
> erasing and rewritting files?

Yes, that generally is possible. I doubt that there are system calls to
do that, but you could write a tool to directly manipulate the directory
contents (see for example <http://forensics.cs.uri.edu/readings/FAT.htm>
for a description of this format)

There may be an easier way to get the files listed in a given order: the
FAT filesystems I have checked this on all seemed to use a 'first fit'
rule for adding new directory entries.

So, if you start with an empty directory, add files A, B, C and D (in
that order), a directory listing will list them in that order.

If you now rename any of the files, the order will still be A, B, C, D.
If you now delete file C, the order will be A, B, D.
If you then add a file named E, the order will be A, B, E, D.

I would guess that this scheme would break down when using long
filenames (for example: if the name of file A was 16 characters, and you
rename it to be 5 characters, that could create an empty slot to store a
short filename between files A and B)

Of course, all of this is dependent on the implementation of the file
system driver. The order an OS lists the files in a directory need not
even be constant on a given operating system.

Reinder
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.