• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
given a folder alias, get aliases to the contained files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: given a folder alias, get aliases to the contained files
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: [ANN] New comprehensive AppleScript book
  • Next by Date: Re: [ANN] New comprehensive AppleScript book
  • Previous by thread: Re: Removing the carriage return in Quark6
  • Next by thread: Re: given a folder alias, get aliases to the contained files
  • Index(es):
    • Date
    • Thread