If you’re like me and need to access file paths for files and folders and prefer to do it via a contextual menu item in Mac OS X Snow Leopard, these directions and screenshots should show you the essentials to get it working:
“Services” have taken over in Snow Leopard and you have complete control of them via System Preferences->Keyboard. If you want to add a new Service to allow you to right click on a file in the Finder and place its file path to the clipboard, fire up Automator and configure it as this screen shot shows and save it as a “Service”. Here’s the code for copying and pasting into Automator:
set itemPath to “”
set uPath to “”
tell application “Finder”
activate
set itemPath to selection as string
set uPath to POSIX path of itemPath
set the clipboard to uPath
end tell
I get syntax error:
Expected expression but found unknown token
on this line:
set itemPath to “”
Diane,
I was able to duplicate what you described. It appears WordPress modified my quotes in the blog post. After you paste my code in to Automator, delete each of the quotation marks and add them back in manually using your keyboard. Then try compiling and all should be well (this worked for me).
Brad