Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Copying path names?

Copying path names?
Thread Tools
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status: Offline
Reply With Quote
May 11, 2004, 02:41 PM
 
Occasionally, I need to describe the full path name to a file in (say) an e-mail message, and it would be much easier to copy this from somewhere, rather than typing it in (being lazy, I know). I tried to see if I could copy from a "Get Info" window, but no luck.

I know I can drag the file onto a Terminal window and copy from there, but it escapes all spaces in the path name, so it's not a perfect solution. Any other ideas?
I do not like those green links and spam.
I do not like them, Sam I am.
     
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
May 11, 2004, 03:58 PM
 
I remember seeing an Applescript that does this very thing; however, I'll need to find it...
     
Addicted to MacNN
Join Date: Apr 2001
Location: europe
Status: Offline
Reply With Quote
May 11, 2004, 04:52 PM
 
Select the file in the Finder then do

Finder->Services->Mail->Send selection
Nasrudin sat on a river bank when someone shouted to him from the opposite side: "Hey! how do I get across?" "You are across!" Nasrudin shouted back.
     
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
May 11, 2004, 05:00 PM
 
Originally posted by Developer:
Select the file in the Finder then do

Finder->Services->Mail->Send selection
That's nifty indeed...however, I wish it would just copy it to the Clipboard and then I could paste it anywhere instead of opening a new Mail.app message...
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 11, 2004, 05:03 PM
 
It's quite easy with AppleScript.
Code:
on open theFile set the clipboard to POSIX path of theFile as string end open
Save that as an application and it will copy the path of any file you drag onto it.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
May 11, 2004, 05:08 PM
 
Thanks Chuckit...
     
Forum Regular
Join Date: Dec 2002
Status: Offline
Reply With Quote
May 11, 2004, 05:43 PM
 
Also try the CopyPath context menu plugin:

http://www.bergenstreetsoftware.com/

Quick and convenient.

Alex
     
Macola  (op)
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status: Offline
Reply With Quote
May 11, 2004, 09:57 PM
 
Originally posted by Chuckit:
It's quite easy with AppleScript.
Code:
on open theFile set the clipboard to POSIX path of theFile as string end open
Save that as an application and it will copy the path of any file you drag onto it.
Thanks...that will do nicely!
I do not like those green links and spam.
I do not like them, Sam I am.
     
JNI
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
May 12, 2004, 11:45 AM
 
OnMyCommand also has a contextual menu item that will copy the full path of items selected in the Finder into the Clipboard.

OMC is a great utility if you haven't tried it. It allows you to add hierarchical contextual menu items that can act on selected text in any application, or files or folders in the Finder, and then trigger shell scripts (and therefore indirectly AppleScripts using the osascript command, perl scripts or whatever can be done from the command line). It supports context sensitivity that e.g. will only activate for folders, files with specific extensions or always active, and does some UI too like dialogs with customizable popup menus, arbitrary text input, Open/SaveAs dialogs, error reporting etc.

I find OMC to be easier to use for acting on selections and such because you don't have to move the mouse up to the Script or Services Menu to trigger the action.
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 12, 2004, 12:06 PM
 
Second vote for OnMyCommand.

I have two path-related contextual items that I added from OMC. One copies the full local path to a file or folder. The other automatically translates a path into the equivalent URL on my website (for files within the web folder). OMC is wonderful, functionality like it should be built in to OS X in my opinion...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:42 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2