• 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 path conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posix path conversion


  • Subject: Re: posix path conversion
  • From: Rick Bargerhuff alias cougar <email@hidden>
  • Date: Fri, 14 Feb 2003 17:22:51 -0500

Hey Paul!

I have a path like so...

file://localhost/Applications/Address Book.app/

this is the url of a file as returned by the finder.
I'd like to convert it to an alias, path, file ref, etc.

passing the posix style URL back through 'Posix file' is the closest I can find. It returns...

set f to "file://localhost/Applications/Address Book.app/"
POSIX path of f
-->"/file/::localhost:Applications:Address Book.app:"

Whack! I assume the 'posix path' command is a wrapper for some command line translation tool. It tries to reverse the translation and gets pooched.

I don't think is is possible to get the "AppleScript/Mac" path of the url. I did some research and can not get
a Mac path from a URL. But this makes no sense.

tell application "Finder"
set thefile to alias "Mac OS X:Users:cougar:Desktop:Weights.xls" -- A File
set theproperties to properties of thefile -- All the properties
set thecontainer to container of thefile -- The container containing the above file
set theurl to url of thefile -- The url of the thefile to get a Mac path from
end tell

No matter what I did, I couldn't get the Finder to do anything with the URL. You'll have to manually
do this I believe. I just don't think there is a built-in routine. Good luck tho!

Rick Bargerhuff alias cougar
Programmer / Developer
Multi-platform Technician / Specialist / Web Designer
Personal Email: email@hidden
Personal Website : http://mywebpages.comcast.net/cougar718
_______________________________________________
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: 
 >posix path conversion (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: applescript-users digest, Vol 3 #1341 - 14 msgs
  • Next by Date: Re: Q: specifying text in a variable to a color when inserting into Apple's Mail.app?
  • Previous by thread: Re: posix path conversion
  • Next by thread: Re: posix path conversion
  • Index(es):
    • Date
    • Thread