View File Path

nutthick

Registered
I need to find out the path for files in OSX. Is there any way I can select a file and then view it's path so I can copy the directory structure to elsewhere. In the end I need to get paths for files on firewire drives, so the mount point would also be needed. Does anyone know if firewire mount points remain the same after a reboot (the drives in question are never unplugged)?

Thanks
 
There's a great little contextual menu module that lets you copy the path of any File from the Finder. It's called CopyPath. I've been using it since before Jaguar, and it still work great. It lets you copy the path of any selected file in either Unix form (e.g., "/Applications/Safari.app") or "classic" HFS form (e.g., "Startup disk:Applications:Safari.app:").

I'm not sure exactly what you mean by "mount point", but the file path will always remain constant, since it only uses the disk's name. e.g., "/Volumes/FireWire Volume/somefile.txt"
 
Thanks Mikuro, but 10.2.8 doesn't seem to have CopyPath on the context menu. My test file is an MP3, so the OS wants to open it with iTunes, but the last item on the context menu is Copy "Song.mp3"

Any ideas?
 
Are you having a problem with firewire mount points ? I have been running backups to an external drive successfully for some time, but since the Mac has been rebooted they no longer work. The only explanation I can come up with is that although the mount point for the firewire drive looks identical the OS does not see it as the same, so I would have to say that they probably don't stay the same.
 
The reason I need the path is I have a large number of files stored on external FW drives that I have listed in a Filemaker Database. Filemaker allows me to put in a button to directly open the file, but obviously I need the path to the file to place into the database.
 
nutthick said:
Thanks Mikuro, but 10.2.8 doesn't seem to have CopyPath on the context menu. My test file is an MP3, so the OS wants to open it with iTunes, but the last item on the context menu is Copy "Song.mp3"

Any ideas?
Are you sure it's installed correctly? It should be located at "~/Library/Contextual Menu Items/CopyPath.plugin". Also, you may need to log out and log back in after installing it before it takes effect.

I also just noticed that there's a newer version of CopyPath called PathSnagger that's in beta form. If you can't get CopyPath to work, you might want to try that. You can get it under the News & Updates section of the CopyPath web site. http://www.bergenstreetsoftware.com/
 
Done it! Thanks Mikuro, really useful plugin.

bobw - That works as well, but the other method places the path onto the clipboard for me, which is really helpful. I'll keep that terminal trick in mind though. Thanks
 
> Is it just my imagination or does CMD + I to view file info also show the path...

You can't even select the text and copy it, making the display of the path completely useless. God, what a crappy operatig system. Sorry, I'm coming from linux and have to work my way through OS X for a small project, and you can't even display the f*ing location of a file?! Seriously??
 
One purpose for needing a path is when the file is used in the terminal - where you can simply drag that file into the terminal window, and the file's path shows up there.
If you need to copy that path, there it is for your use....

Welcome to OS X! Maybe you'll be able to relearn a bit of what you think you know about linux (which OS X is not) Each OS has differences, and you need to consider those differences when you begin working with some of the internals, eh?
 
In the past I've used contextual menu modules like CopyPath or PathSnagger. I haven't found one that works in Snow Leopard, though, which is a pain in the butt. This is coming from a lifelong Mac user, so it's not that I don't know the "Mac way". It's a useful feature, especially for programmers.

So I wrote an AppleScript to fill the void. Not as convenient as a contextual menu item, but it works. See attachment.

And you may find my other thread helpful in using it: http://macosx.com/forums/howto-faqs/303151-use-applescript-menu.html
 

Attachments

Back
Top