 |
 |
Copying path names?
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status:
Offline
|
|
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?
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2002
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status:
Offline
|
|
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!
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status:
Offline
|
|
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
|
|
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...
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|