Re: Rules for first file in folder?
Re: Rules for first file in folder?
- Subject: Re: Rules for first file in folder?
- From: Emmanuel <email@hidden>
- Date: Fri, 4 Apr 2003 21:02:43 +0200
Thanks Chris for taking the time to point out a confusing statement
from me. I apologize. Here are more factual statements.
1. Me and someone else here have observed on a few rapid tests
performed on pre-X OS that the order of the list returned by Finder
(not by AppleScript :-) when asked "every item of ..." might reflect
the order in which the items had been first created on the disk -
maybe the order of the file system ids (refnums)?
2. I have observed on a few rapid tests performed on OSX that such a
thing is not at all true under OSX.
Emmanuel
At 10:12 AM -0800 04/04/03, Chris Espinosa wrote:
----- Original Message -----
From: "Emmanuel" <email@hidden>
Sent: Thursday, April 03, 2003 5:35 AM
Subject: Re: Rules for first file in folder?
At 12:32 PM -0900 02/04/03, MR wrote:
>Are there rules that applescript follows to determine which file is
>the first file in a folder?
I've never seen any rule stated clearly, but I think that the order
is simply chronological.
First, AppleScript follows no rules regarding first file in a folder; the
only things that know about files in folders are the Finder and System
Events (and the occasional third-party osax). Those apps can follow
whatever rules they like.
The most likely case is for them to report the files in the order the
underlying operating system does, which is almost never chronological. Mac
OS Extended ("HFS+") is usually alphabetical case insensitive. But other
disk formats (e.g. DOS FAT disks, file servers, CD-ROMs, etc) can be in any
order that's "natural" to the file system.
Relying on file system ordering introduces bugs into your scripts. Users
will report this as "Your script works great when the files are local but
when I copy the files to a [file server/CD-ROM/DVD-ROM/MS-DOS disk/iDisk] it
doesn't work".
Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.