|
|
10.6: Create a Service to copy a file path URL to the clipboard
I tried this one and I only get the parent folder's path. The original post above works great but I also don't want the file://. I'm running 10.6.2 if that makes any difference. Great hint by the way.
10.6: Create a Service to copy a file path URL to the clipboard
to get a full space and quote escaped POSIX path, try this (Useful for terminal, omits 'file:' prefix).
Add expressions for other exotic characters as needed.
10.6: Create a Service to copy a file path URL to the clipboard
Works great now. Thank you so much!
10.6: Create a Service to copy a file path URL to the clipboard
Cool. And works great in most cases, but not for BASH if the Mac file path includes a slash. I know, shouldn't use slashes but we're in a big company and Mac lets you put a slash in File + Folder names, so people do...
10.6: Create a Service to copy a file path URL to the clipboard
This works, but always adds a newline to the end. This is VERY annoying when pasting into the Terminal, as it executes the command you're trying to create. I added at tr -d "\n" to the end
sed -e 's/:/\//g' -e 's/\ /\\ /g' -e "s/\\'/\\\'/g" -e 's/\"/\\"/g' | tr -d "\n" | pbcopywhich fixes that problem. This Automator command does nothing about the selection of multiple items in the Finder. All the paths get copied, and land in the clipboard. I don't want them all pasted into the Terminal, but might want them pasted somewhere else. In that case, the tr bit on the end will not be what you want. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.18 seconds |
|