Here's another Snow Leopard Automator-based service: It takes the Finder selection and puts the file paths on the clipboard, for easy pasting into command lines or scripts.
How to Use It
- In the Finder, select one or more files or folders.
- From the Services menu, select Copy Files Paths to Clipboard
- Go somewhere and select Edit -> Paste to put the full path(s) to the file(s) there.
For example, if I go to my home folder, select the "Documents" and "Downloads" folders, and then invoke the service, this is what ends up on the clipboard:
/Users/kdj/Documents
/Users/kdj/Downloads
How to Make It
Open Automator, create a new Service, and set it to receive selected files or folders in the Finder.
Add these actions:
- Run Shell Script, with shell
/bin/bash
, passing input as arguments, with this script:for f in "$@" do echo "$f" done
- Copy to Clipboard
Save it, and name it "Copy File Paths to Clipboard".