Re: Finding folder from its id
Re: Finding folder from its id
- Subject: Re: Finding folder from its id
- From: John W Baxter <email@hidden>
- Date: Sat, 23 Mar 2002 14:57:57 -0800
At 9:40 -0800 3/23/2002, Paul Berkowitz wrote:
>
(The OS X Finder doesn't have the id
>
property for item, so no feature, no bug. You'd have to find another method
>
when you move there anyway.)
This part doesn't surprise me. I *think* that Finder happens to use the
file system file ID number (guaranteed unique for all time on a given
volume) before Mac OS X. Mac OS X Finder has to contend with the fact that
there is no file system file ID number on a UFS-formatted disk. The inode
number could have been used, but seemingly isn't. (It also isn't a
"hidden" feature in Finder in Mac OS X based on a quick but not quite
conclusive test just now.)
Aside: does Finder produce an ID for a file on a mounted Windows disk?
One's iDisk? (My guess is "no".)
The fact that the ID can't be used to find a moved file in Mac OS 9
surprises me a little (the file system file ID is one of the many things
the Alias Manager uses to "catch up with" a moved file).
Although your test was flawed, I think:
At 9:40 -0800 3/23/2002, Paul Berkowitz wrote:
>
tell application "Finder"
>
set thePath to ((the first item whose id = 31583) as alias) as string
>
end tell
>
>
Use 'folder' instead of 'item' if you want to restrict it to folders, and
>
put it in an error block in case the folder no longer exists. Frankly,
>
getting the path is just going to make more roundabouts for you. You'd be
>
better NOT to get the path but instead do something like this:
>
>
However, it's not going to work right. The classic Finder screws up again.
>
(It's always doing that.)
Saying it the way you said it will, I think, only look on the desktop.
Fooling around with the much maligned entire contents of disk "..." might
work in this case.
But using aliases (as you suggest later in the same message) is better,
IMHO: I think it's an implementation accident that the file system file ID
number is used by Finder as an item's ID.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
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.