Unix file path problems
Unix file path problems
- Subject: Unix file path problems
- From: Martin Orpen <email@hidden>
- Date: Mon, 28 Jun 2004 00:15:34 +0100
I've got a script that I use to open the Terminal in the directory that I'm
browsing in the Finder:
tell application "Finder"
set myFolder to (target of front window) as string
set pPath to quoted form of POSIX path of myFolder
end tell
tell application "Terminal"
activate
do script "cd " & pPath
end tell
This works fine until you encounter unusual characters in the folder name,
like "" (option-f).
Is there a way of getting these characters interpreted correctly in a POSIX
path?
Annoyingly, the Terminal can easily do this if you drag the folder onto a
Terminal window. And doubly-annoyingly, the Terminal will also run the
script correctly if you change the Terminal window preferences to use ASCII
as its default text encoding - but if you save this as a default and quit
the Terminal, the script will fail again :-(
--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
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.