Re: posix path conversion
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.