Re: posix path conversion
Re: posix path conversion
- Subject: Re: posix path conversion
- From: John Delacour <email@hidden>
- Date: Sat, 15 Feb 2003 00:18:13 +0100
- Mac-eudora-version: 6.0a6
At 4:17 pm -0500 14/02/03, Paul Skinner wrote:
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.
Further to my last message, here's one way to do it. There's
probably an even simpler way in the shell.
set URI to "file://localhost/Applications/Address Book.app/"
set posixPath to do shell script "perl -e '
$_ = q~" & URI & "~;
s~file:/+~~;
s~localhost~~;
s~%([0-F][0-F])~chr(hex($1))~eg;
print'"
POSIX file posixPath
JD
_______________________________________________
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.