**Function:** Turns files and folders into a list of UNIX (POSIX) paths, which can be used with shell scripts.
**Author**: [Emanuele "l0ne" Vulcano](mailto:millenomi@gmail.com)
**Input**: File and folder references.
**Result**: An AppleScript list of paths which can be used with the Execute Shell Script action, or with other actions that accept a set of UNIX paths or text.
**Notes**: This Action, based on [this post](http://www.automatorworld.com/2005/05/20/sanitize-filenames-for-shell-scripts/), returns the path(s) of the input file/folders and optionally sanitizes them by surrounding them in quotes. The action will show up in the System category, and an Italian localization is included. It works best as a Contextual Menu Plug-in: Copy into ~/Library/Workflows/Applications/Finder/
[For users who have downloaded the [Get Path](http://www.automatorworld.com/2005/04/28/get-path/) workflow, this action runs *much* faster - Steve]
Actually, since this is an action, I think you have to make a small workflow to use this as a finder plugin. The following workflow works well when saved as a Finder plugin:
Workflow:
Get Selected Finder Items
Get UNIX Paths of Files
Copy to Clipboard
Comment by Dan — June 5, 2005 @ 2:33 pm
For a Finder plugin you don’t need the first action.
Comment by Steve — June 5, 2005 @ 3:07 pm
Weird, I can’t open this file in Automator. It’s icon says “ACTN” on it, instead of “WFLW”. Is that significant? And there’s no application associated with it.
Comment by Rob — July 16, 2005 @ 1:25 am
In the Automator, in the ‘file’ menu, select ‘import actions’
Then you should be able to see this action.
Comment by Steph — July 27, 2005 @ 9:46 am
It’s strange. Using this script, sometimes I got a format like /dir1/dir2/dir2/file
sometimes I got “Macintosh HD:dir1:dir2:file
Has anyone have the same problem?
Comment by JT — September 12, 2005 @ 1:54 am
This is fantastic, especially since the contextual menu I’ve been using for a while doesn’t work on MacIntel. Thanks for this.
Comment by Wes — March 8, 2006 @ 1:37 pm
Did this stop working? Mine used to work, but now it just spins and spins while automator moves on to the next action.
Comment by Brad — June 14, 2006 @ 9:07 pm
Thank you!!!! What a lifesaver this action is! I’ve been manually working through this for way too long!
Comment by Jonathan Greene — June 21, 2006 @ 11:17 am
I’m impressed with your site, very nice graphics!
Comment by Peter Harral — August 3, 2006 @ 4:30 am
This AppleScript Does the same thing:
on run {input, parameters}
return POSIX path of input
end run
Comment by Kristen — March 25, 2008 @ 8:51 pm