Re: Encoded file URL to Mac or Posix path...
Re: Encoded file URL to Mac or Posix path...
- Subject: Re: Encoded file URL to Mac or Posix path...
- From: Emmanuel <email@hidden>
- Date: Sat, 10 Mar 2007 15:21:27 +0100
At 4:10 AM -0600 3/10/07, Peter Bunn wrote:
Assuming a file named "éøü¥" exists on the desktop, getting a file URL
for it is useful for some purposes...
tell application "System Events"
set target_file to "Macintosh HD:Users:username:Desktop:éøü¥" as alias
set target_URL to URL of target_file
end tell
... returns
"file://localhost/Users/username/Desktop/éøü¥".
Anyone know how to easily coerce that back to an unencoded Mac or Posix
file path?
If you can afford working in Smile, use unescapeURL.
POSIX file (unescapeURL
"file://localhost/Users/username/Desktop/éøü¥")
--> file "emmanuel's hd30:Users:username:Desktop:éøü¥"
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden