Harry
Harry

Reputation: 369

OSX Suggestions to Search/Find Just Folders within Mounted Drives

I've got a number of mounted SMB volumes on my mac (OSX Mavericks), they are not currently indexed by spotlight.

I'd like a quick way to search and open a folder, ideally using some kind of auto-complete.

The folders are in the following format:

I don't want to index the files inside the folders as there are a lot and this would not be very efficient.

I figure this might require me to create an app, but I'd like to know if there is another way - perhaps by adding to the spotlight search? Or a third party app that does similar already?

If I do have to develop something - does anyone have any tips on where to start?

Upvotes: 0

Views: 180

Answers (2)

CRD
CRD

Reputation: 53010

If this is an occasional need (or more, your call) you can use the find - see man find - in the Terminal. You can search a volume for folders matching a pattern, e.g. from your example:

find -x '/Volumes/Volume 1' -type d -name '*Project name*'

will list all folders (-type d) on just Volume 1 (the -x stops find from following links to other volumes) whose names contain Project name. So you will see:

/Volumes/Volume 1/Client A/001 Project name

etc.

You can now copy the path to the folder you want and enter

open <paste copied path - in quotes if it has spaces in it>

in Terminal and the Finder will open a window for that folder.

Upvotes: 1

Harry
Harry

Reputation: 369

One idea:

Create an app witha custom content type and use a Spotlight Importer to import into spotlight. The app would scan through the volumes and create a file for each folder it finds inside a directory. I'd then tell spotlight to search in that directory. When I "find" the folder using Spotlight, the app would just open the volume.

Upvotes: 0

Related Questions