Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Mac to UNIX path conversion AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mac to UNIX path conversion AppleScript
Authored by: balefrost on Sep 16, '08 04:55:15PM

Recent versions of OSX (using 10.5.5 currently) allow you to use "POSIX path of <item>". See Apple's documentation. In addition to what Apple says, it seems to work for forms such as:

POSIX path of "HD:Users:me:Documents:Welcome.txt"

(note that I don't convert the path into a file first, I'm taking POSIX path of <text>)



[ Reply to This | # ]
Doesn't handle special characters well
Authored by: ClassicUser on Oct 24, '08 09:09:22PM

Thanks for the heads-up on this new addition to the AppleScript dictionary, balefrost!

Unfortunately, though, the "POSIX path of …" command doesn't handle several special characters well. For example, spaces are NOT delimited - making the resulting path nearly useless (unless the user were to manually delimit within quotes, for example).

As such, I still prefer the original script, with its manual recreation of this functionality. Kudos (again) to James for this very-useful addition - which I've added as a contextual menu item to ensure direct access.



[ Reply to This | # ]