Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Create a Service to copy a file path URL to the clipboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Create a Service to copy a file path URL to the clipboard
Authored by: robleach on Apr 23, '14 08:13:02AM
Cool. I just used this hint to provide a service to copy the public URL of files in my Sites folder. If you use this on a file that's not in your sites folder, you'll just get the file path:

sed -e 's/:/\//g' -e 's/\ /%20/g' -e "s/^\/Users\/$USER\/Sites/http:\/\/$HOST\/~$USER/g" | pbcopy

Note, I use tcsh as my default shell, so the environment variables I used might be different in the typical default bash shell.

[ Reply to This | # ]