• 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: [Q] How to get a containing folder of a given file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] How to get a containing folder of a given file?


  • Subject: Re: [Q] How to get a containing folder of a given file?
  • From: Marc Myers <email@hidden>
  • Date: Wed, 20 Sep 2006 20:55:09 -0400

This is how I do it, without invoking any applications outside AppleScript:

set theFile to (choose file) as text
set {od, AppleScript's text item delimiters} to ¬
	{AppleScript's text item delimiters, ":"}
set theFile to text items 1 thru -2 of theFile
set theFile to alias (theFile as text)
set AppleScript's text item delimiters to od
theFile
_______________________________________________
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


  • Prev by Date: Re: convert command ignoring reference list in iTunes 7.0
  • Next by Date: Re: AppleScript runs slow on Intel Mac's
  • Previous by thread: Re: [Q] How to get a containing folder of a given file?
  • Next by thread: Re: [Q] How to get a containing folder of a given file?
  • Index(es):
    • Date
    • Thread