given a folder alias, get aliases to the contained files
given a folder alias, get aliases to the contained files
- Subject: given a folder alias, get aliases to the contained files
- From: "Adam K. Wuellner" <email@hidden>
- Date: Wed, 17 Nov 2004 13:45:46 -0600
Is there a better way than:
tell application "Finder" to set theFiles to files of aFolder
repeat with i from 1 to count of theFiles
set item i of theFiles to item i of theFiles as alias
end repeat
I tried:
tell application "Finder" to set theFiles to files of aFolder as alias
...but that errors like this:
Can't make {alias
"macadam:Users:akw:Desktop:teardowns:gayle_td_0_0.bmp", alias
"macadam:Users:akw:Desktop:teardowns:gayle_td_0_1.bmp", [...] } into a
alias.
But that list there (the list of aliases) is exactly what I'm after!
If I remove the 'as alias' I only get the Finder references:
{document file "gayle_td_0_0.bmp" of folder "teardowns" of folder
"Desktop" of folder "akw" of folder "Users" of startup disk of
application "Finder", document file "gayle_td_0_1.bmp" of folder
"teardowns" of folder "Desktop" of folder "akw" of folder "Users" of
startup disk of application "Finder", [...] }
I can tell Adobe Photoshop 7.0 to open these, but they are opened in
Preview. If I use aliases, they open in Photoshop. Weird.
-Adam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden