Copy A Folder or Documents File Path To The Clipboard 0

Trick

Share
Copy A Folder or Documents File Path To The Clipboard

Hey,

Every file and folder on your Mac has a location. Every so often we may want to copy this files path, it very useful to add into emails or documents. Today I am going to show you a couple of methods which allow you to copy a files path to your clipboard. There are a couple of simple methods, such as drag and drop. There is a more complicated method which allows you to set up the action to a service menu. It all depends how often you need the command.

Drag and Drop

The quickest way to find and copy the file path of a folder is to drag and drop the folder into a text editor. For example if you select a file and drop and drop it into TextEditor or Terminal the files path will appear. This is by far the quickest method.

This method doesn’t work in rich editor such as Word. However, the next couple of options should allow you to do it more easily.

Information Menu

If you don’t have a drag and drop editor to hand, another way is to find the path within the Get Info panel. Right click on the file, select Get Info. You will notice the path within the Get Info window. Here you can select the text and copy it to your clipboard by pressing Command + C.

This is a quick way to get the folders path, however it won’t copy the file you have selected.

If you want to quickly copy the files path, Get Info is one of the quickest.

If you want to quickly copy the files path, Get Info is one of the quickest.

Service Menu

One of the best methods for copying the path of a file or folder is with a Service. This is very simple. We are going to build our own using Automator.

Open Automator located within your Applications folder. From the pop up menu, select the Service option.

Select the Service option, within Automator.

Select the Service option, within Automator.

Automator is smart, the first thing we need to do is tell it what type of input we are giving it. At the top of the workflow you will see a couple of options. Select ‘Files or Folders’ from the first drop down, then select ‘Finder’ in the application drop down. This will tell the service the type of input it will be receiving.

Set up the the input for the Service menu option.

Set up the the input for the Service menu option.

The next step is the key part of the workflow. From the library search, or find, ‘Copy To Clipboard’. Drag and drop this workflow option into the workflow window.

The small workflow option will enable this service to work.

The small workflow option will enable this service to work.

When you ready, hit the Save button. Name this workflow with an appropriate name such as ‘Copy File Path To Clipboard’. When you hit OK it will automatically copy the Service into the appropriate location.

 

This service menu will copy file and folder paths to the clipboard.

This service menu will copy file and folder paths to the clipboard.

When you use this service menu option it will copy the file or folder path to your clipboard. It will also copy the file extension, such as .app or .txt. This is the best way to copy file or folder locations as it will give the exact path and it gives the file extension.

If you ever want to delete this Service menu option it is located within /Library/Services. When you delete it, it will be removed from the menu.

Conclusion

There are a variety of different ways to copy the files path. I love the third option of building a service menu, this is because it will copy the path of any file or folder, and give the file extension. It is elegant and simple. Something we have all come to expect from owning a Mac.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips