How to load files/folders by path?

Joined
Mar 13, 2011
Messages
13
Reaction score
0
Points
1
Hi

I recently moved over to Mac from Windows and am a little perplexed that there doesn't seem to be a start > run equivalent.

If I know the path to a file, e.g. /applications/something/somefile.txt, how I can I load it without having to traverse through all those folders in finder? This is very slow to do for long paths when you just want to get to the file in question.

I thought perhaps you could enter full paths to files into the 'search' field, but no dice.

Any help appreciated.

Thanks
 

BrianLachoreVPI


Retired Staff
Joined
Feb 24, 2011
Messages
3,733
Reaction score
124
Points
63
Location
Maryland
Your Mac's Specs
March 2011 15" MBP 2.3GHz i7 Quad Core 8GB Ram | Mid 2011 27" iMac 3.4 GHz i7 16 GB RAM 2 TB HDD
Try hitting command+space - then typing your file name in the spotlight search window - once you see it - just hit enter. You can also use the Go to folder window - hit shift+cmd+G
 
OP
M
Joined
Mar 13, 2011
Messages
13
Reaction score
0
Points
1
That brings up Spotlight, but it says 'no results found' for my item - or, it seems, for any items in my target directory (/Applications/Opera.app/Contents/Resources/styles)

The path to my item, by the way, is correct (I confirm it with clicks through Finder).

Thanks
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Spotlight won't search within app bundles because, for Spotlight, an app bundle is a file. Your best bet is Shift-Command-G as noted by BLVPI above. The only caveat with using that shortcut is that Finder has to have focus which can be a pain.

Here's a bit of a long winded way to get what you want:
1. Open up Automator.
2. Select "service".
3. Change "service receives selected" to "no input" and the next drop down to "any application".
4. Add a "Ask for Text" action and fill in a question (something like "What do you want to run?")
5. Add a "Run Shell Script" below that and change the value to the following:
Code:
open $@
6. Give it a try by hitting run. You should see a dialog box ask your question. Input the file or directory you want to open and push ok. If all went well, it should run/open the file/folder.
7. Save it.

You should now notice that regardless of application, you can go to its menu > Services and the service should be there. If you want that to have a keyboard shortcut, open up System Preferences > Keyboard > Keyboard Shortcut. Double click to the right of your new service (it should be towards the bottom of the services) and give it a shortcut. One thing to be careful of though - don't give it one that is used in other applications. Either make it really unique or don't give it one.
 
OP
M
Joined
Mar 13, 2011
Messages
13
Reaction score
0
Points
1
Thanks very much. I'm a little staggered that such a simple action requires such lengthy steps. Perhaps, as a developer, I should have stuck with Windows :(
 

BrianLachoreVPI


Retired Staff
Joined
Feb 24, 2011
Messages
3,733
Reaction score
124
Points
63
Location
Maryland
Your Mac's Specs
March 2011 15" MBP 2.3GHz i7 Quad Core 8GB Ram | Mid 2011 27" iMac 3.4 GHz i7 16 GB RAM 2 TB HDD
Thanks very much. I'm a little staggered that such a simple action requires such lengthy steps. Perhaps, as a developer, I should have stuck with Windows :(


Did you try Shift-Command-G?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
My solution is a glorified, non-terminal way of doing what Dysfunction has noted. Either solution should work depending on what you're comfortable with.

One thing to note, as I alluded to earlier, is that you're trying to access something that is inside an app bundle. App bundles are treated as files despite the fact that they are technically folders. Anything outside an app bundle should be easily accessible with Spotlight.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top