Tip: Autocomplete path names in Finder's 'Go to Folder'

Typing paths into Apple's "Go to Folder" option can be a bit cumbersome, but there are other options including autocomplete within this feature and the use of the Terminal.

When attempting to access hidden folders in OS X, you can use a tool like TinkerTool or MacPilot to reveal hidden items in the Finder and then navigate to the desired folder, or if you know exactly where you want to go then you can use the Finder's "Go to Folder" option that is available in the "Go" menu. This option brings up a window where you can enter the full path to the desired folder which will then open in the Finder when you click "Go," but to use this, the full path must match exactly.

Finder "Go to Folder" window
The "Go to Folder" window will autocomplete folder names either automatically or immediately if you press Tab

One way to avoid errors when entering the folder path in the Go to Folder window is to make use of the window's autocomplete options. When you start typing the folder path in this window, the Finder will try to match what you type to an existing folder on the file system. If one exists, then it will automatically fill in the remainder of the folder name. For example, when going to the hidden folder "/usr/libexec" you can type in the whole path, or you can just type "/usr/libe," and then the Finder will fill in the reset of the path name after a moment. You can speed this process up by using the Tab key, so after typing the first part of a folder name in the window you can press Tab to have it immediately try to fill in the remainder of the folder's name, provided that folder exists.

Finder and Terminal
Using the "open -R" command in the Terminal you can reveal items in the Finder. Using a period after the final folder name will open that folder in the Finder instead of just revealing it within its parent folder (click for larger view).

This feature may add some convenience to the Finder's "Go to Folder" option, but one limitation that the "Go to Folder" option has is that if there are multiple folder names that begin with the text you entered, then it will just pick one and not give you an option to choose from them all. Therefore, if you type in "/usr/l" and either press Tab or otherwise allow the path to autocomplete, then the "Go to Folder" window may autocomplete the path to "/usr/local" or "/usr/lib" instead of the desired "/usr/libexec."

A way around this limitation is to use the Terminal instead of the "Go to Folder" option for navigating through folders and opening them. To do this, just open the Terminal and type "open -R" followed by a space. The "open -R" command will reveal the item in the Finder--safer than using just "open" by itself, and less cumbersome than using "cd" to change directory followed by "open ." after the fact.

After typing the "open -R" command, then type the first few characters of your file path (i.e., "/usr") and press the Tab key twice. The first time you press the Tab key the Terminal will autocomplete the file path as best it can (to the point where it runs into more than one available option based on the text that you have entered), and then will list the available options the next time the Tab key is pressed. From here you can then continue to type the beginning characters of the available options, followed by pressing Tab to complete them and list more options if needed. When the full path of the desired folder is in the Terminal, either press enter to reveal that folder in the Finder or type a single period before pressing enter to open that folder in the Finder. Either way, it should show in the Finder and be navigable.

Ultimately using the Terminal or the "Go to Folder" option may be more cumbersome than temporarily enabling hidden items in the Finder, but if you do not regularly access hidden items or readily have a utility to enable or disable them, then using these options may be a quick way to get around.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Tags:
Computers
Path
About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    Join the discussion

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    HOT ON CNET

    Love heavy and clunky tablets?

    Said no one ever. CNET brings you the lightest and thinnest tablets on the market.