PDA

View Full Version : Get File Path w Filename




doubledee
Jul 20, 2013, 02:30 PM
In Mountain Lion, is there an easy way to get the File Path + Filename of a file selected in Finder?

(It seems like there was a way to do this in Snow Leopard - although it was a PITA - but I don't see anything in ML.)

There are lots of times I want/need this, and right now it would help when I check the SHA1 for apps I download.

For example, if I downloaded something like OpenOffice in my "reallyLongPathTo/zDownloads" directory, it would help to quickly copy the File Path + File name from Finder so I can paste it into Terminal and easily run a check on the SHA1 digest.

Sincerely,


Debbie



GGJstudios
Jul 20, 2013, 02:35 PM
This may help: How to copy a file path in OS X (http://reviews.cnet.com/8301-13727_7-57578129-263/how-to-copy-a-file-path-in-os-x/)

For using a file path in Terminal, simply drag the file into the Terminal window.

doubledee
Jul 20, 2013, 03:44 PM
This may help: How to copy a file path in OS X (http://reviews.cnet.com/8301-13727_7-57578129-263/how-to-copy-a-file-path-in-os-x/)

For using a file path in Terminal, simply drag the file into the Terminal window.

I tried this...


Create a path-copying service
If you regularly need to copy a file path as text, an easier option would be to create a service in Automator that will do this for you. First launch Automator and create a new service workflow. Then make sure the inputs for it are "Files or Folders" in the Finder (done with the menus at the top of the workflow). Then drag the "Copy to Clipboard" action to the workflow area and save the service with a name like "Copy Path as Text."



So how do I find this "service" I created?

What if I need to rename it or delete it?


Debbie

GGJstudios
Jul 20, 2013, 03:47 PM
I tried this...
So how do I find this "service" I created?

What if I need to rename it or delete it?
You should be able to see the service, rename it or delete it from within the Automator app.

doubledee
Jul 20, 2013, 03:53 PM
You should be able to see the service, rename it or delete it from within the Automator app.

But I don't...


Debbie

GGJstudios
Jul 20, 2013, 04:02 PM
But I don't...
It may be simpler for you to just drag the file into the Terminal window to get the file path.

doubledee
Jul 20, 2013, 04:05 PM
It may be simpler for you to just drag the file into the Terminal window to get the file path.

I'm going to try that when my OO download is done, and the script above works, but I just want to know where it is stored so if I ever want to Rename it, Copy it, Delete it, etc I know how to...


Debbie

Weaselboy
Jul 21, 2013, 11:18 AM
I'm going to try that when my OO download is done, and the script above works, but I just want to know where it is stored so if I ever want to Rename it, Copy it, Delete it, etc I know how to...


Debbie

Services are kept in this Folder. ~ = your personal users folder. Shift-command-g (all three at once) in Finder then paste this in and enter.

~/Library/Services

doubledee
Jul 21, 2013, 11:33 AM
Services are kept in this Folder. ~ = your personal users folder. Shift-command-g (all three at once) in Finder then paste this in and enter.

~/Library/Services

Is that a hidden directory?

If so, how do I show hidden directories in Finder?

Sincerely,


Debbie

Weaselboy
Jul 21, 2013, 11:36 AM
Is that a hidden directory?

If so, how do I show hidden directories in Finder?

Sincerely,


Debbie

Yes... by default the user library folder is hidden. You can option key click the Go menu in Finder to see it, or you can run the command below in Terminal to keep it unhidden. It will get hidden again every time a new OS update comes out like 10.8.5.

chflags nohidden ~/Library

doubledee
Jul 21, 2013, 06:57 PM
Yes... by default the user library folder is hidden. You can option key click the Go menu in Finder to see it, or you can run the command below in Terminal to keep it unhidden. It will get hidden again every time a new OS update comes out like 10.8.5.

chflags nohidden ~/Library

Is it bad to leave that unhidden?

And how would I reverse it?

Maybe...

chflags nohidden ~/Library

:confused:

Sincerely,


Debbie

Weaselboy
Jul 22, 2013, 09:44 AM
Is it bad to leave that unhidden?

And how would I reverse it?



You can hide it again with the command below, but there really is no downside to leaving it unhidden. Apple just hides it to keep uninformed users from getting in there are breaking things by tinkering around.

chflags hidden ~/Library

HenryAZ
Jul 22, 2013, 10:22 AM
Is it bad to leave that unhidden?

And how would I reverse it?



Unhide it, and drag it to the Finder sidebar, where it will remain unhidden through updates.

doubledee
Jul 22, 2013, 10:10 PM
Thanks for the help everyone!!!

Sincerely,


Debbie