• 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: POSIX file usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX file usage


  • Subject: Re: POSIX file usage
  • From: Philip Aker <email@hidden>
  • Date: Sat, 31 Aug 2002 15:31:36 -0700

On Friday, August 30, 2002, at 12:25 AM, Adriaan Tijsseling wrote:

set dpath to ((path to preferences folder) as string) & "somefile.txt"
set upath to (POSIX path of dpath)
do shell script "open " & upath

Well, in my example I used the Preferences folder, but that is not always the case. What if it is in "/Users/foo/somdir/"?

Greetings Adriaan,

There is a trick for getting folders not listed in the Standard Additions dictionary. You can use the following form with different keywords:

POSIX path of (path to "usrs")
POSIX path of (path to "cusr")
POSIX path of (path to "sdat")

These keywords are adapted from the enumerations in header file called "Folders.h" which is available immediately to you if you have installed the Developer Tools or from several places on the internet (perhaps on Chris Nebel's idisk as well).


Cheers,

Philip Aker
http://www.aker.ca
_______________________________________________
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.

References: 
 >Re: POSIX file usage (From: Adriaan Tijsseling <email@hidden>)

  • Prev by Date: Re: AppleScript Try
  • Next by Date: Re: AppleScript Try 2 Improve, DIY Dragons
  • Previous by thread: Re: POSIX file usage
  • Next by thread: Re: POSIX file usage
  • Index(es):
    • Date
    • Thread