Spotlight Filter by Path

Discussion in 'macOS' started by abnospam, Apr 25, 2010.

  1. abnospam macrumors regular

    abnospam

    Joined:
    Jul 17, 2008
    #1
    Hi Everyone - I'm brand new to OSX, and I have found one thing that is a bother to me. I can not seem to find anyway to search on PATH or more specifically filter out by PATH.

    Let me give you my use case.

    I search for a client's name, say "Apple". Now I get tons of hits with the word Apple from Entourage emails/attachments, hits on apps, hits on filenames, hits on folders and hits on file content. Well, I know the file I am looking for is specifically under the "Clients" folder so I want to filter out the results to just those under that folder tree. I just can't find a way to do it. Not only is PATH no available as a column to view and sort by, but it also appears to not be searchable and I can't find a search keyword to use like onlyin: or path:

    Please tell me there is a solution!
     
  2. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #2
    1. Open Finder
    2. Navigate to the folder you wish to search in
    a. You can do this faster by using Command + Shift + G and typing your path (Use tab completion to make this go faster)
    3. Type your search in Finder's Spotlight
    4. When the search bar appears, select the name of the folder, in this case "Clients"
    5. Add any additional options by clicking the + sign, for example by file type or creation date, etc.


    If this is a search you perform often, you can save it to your "Saved Searches" (~/Library/Saved Searches). At that time you will be given the option to add it to the sidebar as well. If you decide to add it later, navigate to the path I gave and drag it to the sidebar.


    Default Search Path:
    To make the default search location the current folder:

    Finder --> Preferences --> Advanced --> When Performing a search: --> Search the Current Folder

    This can also be done via the defaults command:
    Code:
    defaults write com.apple.Finder FXDefaultSearchScope value
    Replace value with the value that corresponds to the preferred behavior:

    Search this Mac: 1396925814
    Search the Current Folder: 1396925286
    Use the Previous Search Scope: 1396929392

    For example in the case given above:
    Code:
    defaults write com.apple.Finder FXDefaultSearchScope 1396925286
    *DISCLAIMER* These seem to be very arbitrary values. I tested their behavior with 3 different machines, two running 10.6.3 client and another running 10.6.3 server. In each case these values gave the expected behavior. Your mileage may vary.

    I mention these because it could be useful when setting up a custom profile from scratch, the process could be much more automated.
     

    Attached Files:

  3. abnospam thread starter macrumors regular

    abnospam

    Joined:
    Jul 17, 2008
    #3
    Wow - what a great response. I think this can work for me. Thanks so much. I am getting my OSX sea legs!
     
  4. MGDj macrumors newbie

    Joined:
    Jul 28, 2011
    #4
    This is exactly the problem that I've struggled with for a long long time. However simply searching in a specific directory doesn't solve my problem.

    I've been archiving files for almost 15 years. In the beginning I would collect work files until I had enough to fill a CD. Then I burned double copies for archiving. Eventually I moved to DVDs so I was able to store more files, but file sizes also tended to be larger. A few years ago external storage became affordable enough for me to move all of this data to a couple of 1TB drives and have my entire archive online. I also have time machine backing up all of this data and I still burn files to DVDs so that I have relatively cheep backups of all my files which I store both onsite for added redundancy and offsite for added security.

    My archiving system is organized by numbers which are roughly in order by time. For example archive disk 1 is named archive001 and has files from the spring and summer of 1997, followed by archive 002which has files from the fall of 2007, and so on. I'm now up to archive325. These archives contain everything work related that I've accumulated dating back to 1997. Each disk contains folders named by clients name. Within those folders are folders named by job name, and within those folders can be any number of other folders related to that specific job and often nested several levels deep. To sum it up, I have many thousands of folders with probably millions of files.

    I've had some clients come and go but I have others that have been with me from the beginning. Therefore I might have 300+ folders for clientX. If I'm looking for a file belonging to clientX but I have no idea what the file name is, it's impossible to find. (I have lots and lots of folders of images with names like IMG2345.jpg) How do I find a photo of for example a house that I used in a job which I can't recall the name of sometime between 2000 and 2005, but I know it was for clientX?

    I need to be able to search with a filter like "and path contains 'ClientX'". I've tried lots of cataloging and search apps but with the exception of one program, no search application that I'm aware of offers this functionality. Spotlight is practically useless. I'm still using Snow Leopard, but I doubt Lion improves on this. Am I wrong?

    By the way, the one app that does offer this type of searching is iView Media Pro. When I used it, that aspect worked like gangbusters but it had a few other caveats that made it less than a perfect solution for me. Besides, how hard should it be to filter by path?

    Does anyone have any suggestions, or know of alternatives to spotlight that I should try?

    Thanks for reading my long winded reply.
     

Share This Page