• 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
Re: File path info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File path info


  • Subject: Re: File path info
  • From: Walter Ian Kaye <email@hidden>
  • Date: Mon, 1 Mar 2004 16:43:09 -0800

At 03:27p -0800 03/01/2004, Duane Mitchell didst inscribe upon an electronic papyrus:

Hello,

I'm an AppleScript newbie and have a basic question on file specs.

I am using the choose file scripting addition command to set a variable for a chosen file. I'd like to know how I can get the name of the folder that a file is in from the file spec: alias "MacHD:Folder1:File".

One possible way would be to ask the Finder for its container:

tell app "Finder" to set c to (container of myAlias) as alias

Another way would be to split on the colons and reconstruct.

Also, if there is any other useful info that I could get from this basic file spec that would be appreciated.

Check out the 'info for' command in Standard Additions, and the 'POSIX path' property. And the properties for file and item in the Finder.


-boo
_______________________________________________
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.


  • Follow-Ups:
    • Re: File path info
      • From: Emmanuel <email@hidden>
    • Re: File path info
      • From: Zachary Smestad <email@hidden>
References: 
 >File path info (From: Duane Mitchell <email@hidden>)

  • Prev by Date: File path info
  • Next by Date: Re(2): Folder size
  • Previous by thread: File path info
  • Next by thread: Re: File path info
  • Index(es):
    • Date
    • Thread