The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,651 other followers

Mac OS X: copy the current Finder folder or file name to the clipboard

Posted by jpluimers on 2014/05/06

Copying the path from the Finder to the clipboard is a bit cumbersome.

A simple way contains a bit of repetitive steps, and to read Mac OS X: Open a Terminal at Folder from Finder:

  1. Open a Terminal window in the finder
  2. Type this command in the Terminal window
    pwd | pbcopy

This simple way was suggested my User Kyle Cronin, thanks!

Some notes:

  • pwd prints the current working directory.
  • pbcopy copies the input to the clipboard.

Another way is using Automator. It is a bit more complex to setup, but the actual usage is easier:

  1. Select the folder or file in the Finder
  2. Right click
  3. For a folder: select “Services”
  4. Select “Copy File Path”

Setting this up is a bit more complex and requires the first 5 steps from Copy file or folder path to the clipboard in Mac OS X Lion | MacYourself:

  1. Launch Automator from your Mac’s Applications folder. If you’ve never used Automator before, that’s not a problem. This is going to be so simple anyone can do it.
  2. Double-click the Service icon from Automator’s start menu.
  3. Toward the top of the right column, you’ll see this line of text: “Service receives selected _____ in _____”. Choose “Files or Folders” from the first menu and “Finder” from the second.
  4. Next, click on Utilities in the Actions library on the left side. Double-click “Copy to Clipboard” in the middle column. You’ll notice that this action has been added to our workflow on the right.
  5. Go to File > Save in the menu bar and name your service Copy File Path. Our work with Automator is now done, so you can safely quit it once the service is saved.

I’ve skipped the other steps, as I don’t need a keyboard shortcut for this.

–jeroen

via: Copy file or folder path to the clipboard in Mac OS X Lion | MacYourself.

3 Responses to “Mac OS X: copy the current Finder folder or file name to the clipboard”

  1. CRConrad said

    P

  2. CRConrad said

    I think installing the freeware utility XtraFinder gives you “Copy Path to Clipboard” as a right-click menu option in Finder. With several sub-menu options, like just directory, just filename, or full path.

Leave a Reply to CRConrad Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: