Smart Folder search - Exclude sub folders?

When creating a Smart Folder is it possible to exclude sub folders of the folder you're searching, or a particular folder?

There is no way to reference a folder in Spotlight. That item cannot be used in a query.
kMDItemPath
Complete path to the file. This value of this attribute can be retrieved, but can't be used in a query or to sort search results.

Similar Messages

  • Exclude *All* Subfolders From Smart Folder Search

    I know how to make a Smart Folder search two different directories and retrieve results from each (e.g. /Applications and /Developer). I've also seen disscusions here on excluding particular subfolders, but to no avail. So here's a simpler request: is it possible to exclude all subfolders from a Smart Folder query? Suppose I have the following directory structure:
    Foo/
    A.txt
    B.txt
    Bar/
    C.txt
    D.txt
    Baz/
    E.txt
    F.txt
    G.txt
    Given a search for *.txt files, I'd like the following result:
    FooSearch.smartSearch
    A.txt
    B.txt
    G.txt
    Possible or no?

    I have a similar issue, but want to exclude results that are within Mail. 

  • Need help searching in sub-folders?

    Bridge CC (Win7) .
    I often need to find a file say "Carmel" and don't know which folder it is on. I know in the top right corner I can do a search. But sometimes it will look in all sub folders, and sometimes clearly not since it gives me zero results. I'm not sure with those tiny icons by the find field how to tell it to search all sub-folders?
    What am I doing wrong.
    Thank
    Maxi

    I know in the top right corner I can do a search. But sometimes it will look in all sub folders, and sometimes clearly not since it gives me zero results.
    This search field only uses the files you have selected or pointed to in the content panel. For proper searching with lot's of options and ability to chose the source, including subfolders and non indexed files you need to use the dedicated Find command Edit / Find or cmd +F on a Mac

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • I was re-naming a folder with many sub folders suddenly Thunderbird did not respond and the folder and sub folders I was re-naming disappeared.

    I was re-naming a folder with many sub folders attached, suddenly, Thunderbird did not respond and the folder I was re-naming disappeared along with all the sub folders attached to it. How can I get them back? I am not a computer savvy person. Any help would be greatly appreciated.
    Thank you.
    [email protected]

    Turned out that my anti-virus was doing a scheduled scan and had found a virus in an email attachment in my deleted items folder, thus nothing being able to do during the scan.

  • Getting all webI reports in a folder and its sub-folders using java sdk.

    hi,
    I need a java code to get the Id of all webi  reports in a folder and recursive sub folders .
    Is there any sample code or tutorial  available for It?
    regards,
    nitin

    I didn't test this but it should work. Import required packages.
    <%
    String username = "administrator";
    String password = "<password>";
    String cmsname = "<cmsname>";
    String authtype = "secEnterprise";
    IEnterpriseSession oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authtype);
    IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService("","InfoStore");
    getWebi(oInfoStore,0,out);
    oEnterpriseSession.logoff();
    %>
    <%!
    public void getWebi(IInfoStore oInfoStore, int sourceFolderID, javax.servlet.jsp.JspWriter out)
    try
         String query = "select * from ci_infoobjects where si_kind='webi' and si_instance =0 and si_parentid =" + sourceFolderID ;
         IInfoObjects oInfoObjects = oInfoStore.query(query);
         for(int i=0;i< oInfoObjects.size(); i++)
              IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
              out.println(oInfoObject.getID() + "  " + oInfoObject.getTitle() +"<br>");
         String query = "select * from ci_infoobjects where si_kind='folder' and si_parentid = " + sourceFolderID ;
         oInfoObjects = oInfoStore.query(query);
         for(int i=0;i< oInfoObjects.size(); i++)
              IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
              getWebi(oInfoStore, oInfoObject.getID(), out);               
    catch(SDKException e)
         out.println(e.toString());
    %>

  • Can't save smart folder searches

    When trying to save a smart folder search the save dialog box quickly slides down and then up without stopping to let me actually save it. Has anyone else experienced this problem and possibly know of a solution? Thanks in advance.

    Yes, you can edit them even more easily using Property List Editor, if you have that installed.
    I tried making a smart folder with Activity Monitor running to see if I could spot anything interesting. All I noticed was that both Finder and Windowserver were more active as I created and saved a new one (and mds of course as the search was was done). So that wasn't very enlightening. The only other thing that occurs to me is perhaps something has gone wrong with the Saved Searches folder itself (it's in your home Library folder), since that is the default place to save to. I tried copying my folder to another drive, then trashed the original. When I relaunched the Finder and created a new Smart Folder the Finder had created a new Saved Searches folder. If that doesn't work either, you can trash your creation and put the original back.
    Francine
    Francine
    Schwieder

  • Excluding items in a given folder from a Smart Folder Search

    Hi: Looking for a tip here. I would like to exclude what pops up in a smart folder based on what folder it is. I do NOT want to exclude that folder from my general spotlight search ability, just in that smart folder.
    Reason asking: I have a folder in docs that I use everyday, and backup (with a 3rd party utility) to my iDisk folder. This way I have backups on my home computer at virtually all times. (iDisk is good for backups, Dropbox for 'sharing') I have a smart folder that displays all the stuff that i've worked on in the last day. I've used a lot of 'not' tricks to exclude all but the file types I use, but I always get a double copy in that folder. The one in my working folder and the one on my iDisk. What would be perfect is to simply say exclude what is found at the iDisk location, but that doesn't seem to be an option in the search criteria. I could exclude the while iDisk from spotlight in general, but I still want to be able to find things when I type them on the standard search.
    Any thoughts?

    thanks, Michel. it had occurred to me to put a scratch tag on the folder, but I was hoping for an easier way. in future I'll do as you suggest though, because it's easier than what I have been doing.
    daryl

  • Finder smart folder:  "Search for:Today" has changed

    I noticed today that the smart folder has changed and now only seems to be showing applications and not files also.
    I'm not sure what changed it initially, but to try to "fix" it, I went to the finder toolbar and selected "Action>Show Search Criteria". What should the default settings be for this folder as installed by Mac OSX Leopard?

    The default criteria for Today and Yesterday, Apple's canned searches, are "Last Opened date is today" or "yesterday" plus "None of the following are true---Kind is Folders." If your are correct and aren't returning what you want, construct your own search that does what you want, then save it as a misnamed "Smart Folder"--be sure to check the box in the Save dialog to have it appear in the Sidebar.
    Francine
    Francine
    Schwieder

  • Smart Folder search options

    When I create a new Smart Folder, the only search options available are "This Mac" & "Documents" (no option for the "Home" folder as described in Help).
    This may be OK, except that the smart folders I have created are to find the most recently accessed spreadsheets, Word documents, powerpoints by type (one folder for each). When I set up the Smart Folder they work well if i specify "This Mac" (as not all the relevant docs are in the directory structure, I may have some on my desktop for example).
    But, when I reopen the Smart Folder later, I do not see all my recently accessed files, I see some other selection.
    So I have to open 'search options'. The options have changed to "This Mac" & "Recent WORD.saved search" (the name I have given the smart folder), with the latter selected. I then have to click on "This Mac" and the search refreshes correctly. Even though i subsequently save again with "This Mac" selected, it reverts to "Recent Word.saved search" when I look the next time.
    This used to work the way I wanted and displayed the files I wanted when first opened. The change may be either a) because of changes in Snow Leopard; or b) because I now have shared computers and drives sometimes available and I wonder if these cause the saved search not to like "This Mac" option in case some of the directories are not available...just a thought.
    Any ideas if I am doing something wrong or is there a bug?

    Phew. I just figured this out. I had the opposite problem that you have. All my searches were restricted to my home folder. The answer is that the default search location when you select "New Smart Folder" is set by the default location for a new Finder window. Yours must be set to "Documents".
    You don't have to select "New Smart Folder", though. You can open the folder or drive you want to search and then start typing in the search criteria field in the upper right to start a search restricted to that folder or drive.
    Confusing behavior. That top bar for the location of the search should be editable.

  • Smart Folder searches within itself

    After upgrading to SL last fall the Smart Folders started to misbehave in the following manner:
    The smart folder set to search "This Mac" would after restart search within itself. E.g I have created a Smart Folder finding all Word documents edited within the last week, called "Word last week". But the folder start to search within itself, e.g."Word last week" instead of in "This Mac". I have checked and, after some days, the query delivers different results if I change back to search within "My Mac".
    What can I do to force Smart Folders to search the whole harddrive and quit being so self-centered (self-referencing)?

    They aren't searching "within themselves" but searching wherever you told them to. If you click a saved search (AKA Smart Folder) and then select the Show Criteria option, you will see the name of the smart search next to the "This Mac"--but it is just the name, it is searching where you told it to when you created it. Evidently the programmers decided something had to occupy that spot in the search criteria, and opted to have it display the name of the Smart Folder.
    That said, there is a really bad bug in saved searches that involve date as a criteria. They aren't updating properly because the wrong thing is being added to raw query of the search when you create it. Thus if you want a Smart Folder that finds MS Word docs created in the last 3 days, it won't update. If you use it next week it will continue to search for the created date of files from when you made it. I suspect this bug is what is throwing your results off.
    Francine
    Francine
    Schwieder

  • Coping folder contents and sub folders

    So, I'm working on a little practice folder sync project (fun with my mac)...
    ...and I'v gotten hung up a bit because my little copying app doesn't seem to count folders and sub folders (which I suppose makes sense).
    My initial idea was to take just the date of modification and compare it to the last date that the app was run, inorder to only copy changed files. But this seems problematic on a few levels, so...
    So, my two part question is:
    1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.

    >1. Is there a simple command to copy folder contents and sub-folder contents, or do I need to tell the script to do each sub-folder individually?
    There are two common solutions to this.
    The first is to use the Finder's 'entire contents of...' command to get a list of everything in the folder, including sub-folders, the second is to make your script recursive - that is, it calls itself several times over.
    In the first case it's as simple as:
    tell application "Finder"
    set allItems to entire contents of folder "path:to:source:folder:"
    -- rest of code goes here
    end tell
    This can have problems, though, especially on very large directories since the Finder is not very efficient at building a list of hundreds or thousands of files.
    The recursive path is a little trickier, but you write a handler to process a folder then repeatedly call that handler, like:
    <pre class=command>on run
    set sourceFolder to (choose folder)
    processAFolder(sourceFolder)
    end run
    on processAFolder(theFolder)
    tell application "Finder"
    set allItems to items of folder theFolder as alias list
    repeat with eachItem in allItems
    if class of eachItem is folder then -- we have a subfolder
    processAFolder (eachItem)
    else
    -- code here to compare the file and back it up
    end if
    end repeat
    end tell
    end processAFolder</pre>
    So here you walk through the folder, each time you find a new folder, you walk through that until you're done. The code takes care of keeping track of where you are in the folder hierarchy.
    >2. I imagine that a better way to manage which files/folders need to be updated is to create a file with a list of the contents, and dates of modification, and compare the new folder list and the old folder list to each-other... ok.. so, um. yeah. that sounds tricky.
    There's no need to keep a file. Assuming you have two folders you can just walk through one of them checking to see if each item exists in the other, then copy the newer file to the other directory, like:
    <pre class=command>on processAFile(fileName, sourceDir, destDir)
    tell application "Finder"
    -- check if the files exist
    set sourceFileExists to (file fileName of folder sourceDir exists)
    set destFileExists to (file fileName of folder destDir exists)
    -- now comes the logic
    if sourceFileExists and not destFileExsits then
    duplicate file fileName of folder sourceDir to folder destDir
    else if destFileExists and not sourceFileExists then
    -- assuming you want a two-way synch
    duplicate file fileName of folder destDir to folder sourceDir
    else -- both files exist, so check mod dates
    if (modification date of file fileName of folder sourceDir) > (modification date of file fileName of folder destDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    else if (modification date of file fileName of folder destDir) > (modification date of file fileName of folder sourceDir) then
    duplicate file fileName of folder sourceDir to folder destDir
    end if
    end if
    end tell
    end processAFile</pre>
    If you're not planning a two-way synch an even simpler option is to just keep track of the last time the synch was run. Then all you need to do on subsequent runs is ask the Finder for 'every file of folder sourceFolder whose modification date is greater than lastRunDate'.

  • Smart folder search with "comments" does not work

    I am using Lion (OS 10.7.5), and am unable to define a Smart Folder in which the search criteria is a particular Comment in "Get Info". Nothing appears in the folder. In System Preferences, Spotlight lists under "Search Results" 15 different categories, but "Comments" is not one of them.

    Hi,
    I haven't tried this, but the auth part is mainly added to support credentials for OpenSearch result sources. It might work for SP as well, but you have to make sure you have enabled basic auth on the web app. Have you done that?
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • Why can't smart folder search by aperture or fnumber?

    I have tried to use smart folder to locate some of my images by using some attributes such as aperture and fnumber . But the smart folder returned none.
    However I can use it to search by iso speed and exposure time.

    Different cameras, at different settings, record different things to the metadata of the file. For instance, my Canon, old Nikon, and a Kodak all have the focal length in their metadata, none have the fnumber, and the Canon and Kodak both have the aperture, but the Nikon doesn't, while the Nikon and Kodak show the ISO while the Canon doesn't. To find out what is available to search with your camera's files, you'll need to either have an mdls utility, or use the mdls command in Terminal. To use it in Terminal:
    1. Launch Terminal (it is in your Utilities folder)
    2. Type:
    mdls
    a space, then drag and drop a sample file into the Terminal window and hit return.
    3. The result will look something like this:
    -bash:~francine$ mdls /Users/francine/Pictures/Summer06/Mustang/IMG_2521.JPG
    /Users/francine/Pictures/ Summer06/Mustang/IMG_2521.JPG -------------
    kMDItemAcquisitionMake = "Canon"
    kMDItemAcquisitionModel = "Canon PowerShot S50"
    kMDItemAperture = 2.96875
    kMDItemAttributeChangeDate = 2006-08-09 14:22:34 -0700
    kMDItemBitsPerSample = 32
    kMDItemColorSpace = "RGB"
    kMDItemContentCreationDate = 2006-07-26 15:28:47 -0700
    kMDItemContentModificationDate = 2006-07-26 15:28:47 -0700
    kMDItemContentType = "public.jpeg"
    kMDItemContentTypeTree = ("public.jpeg", "public.image", "public.data", "public.item", "public.content")
    kMDItemDisplayName = "IMG_2521.JPG"
    kMDItemEXIFVersion = "2.2"
    kMDItemExposureMode = 0
    kMDItemExposureTimeSeconds = 0.00125
    kMDItemFinderComment = "width/height: 1600 x 1200 resolution: 180 dpi Canon PowerShot S50"
    kMDItemFlashOnOff = 0
    kMDItemFocalLength = 7.09375
    kMDItemFSContentChangeDate = 2006-07-26 15:28:47 -0700
    kMDItemFSCreationDate = 2006-07-26 15:28:47 -0700
    kMDItemFSCreatorCode = 0
    kMDItemFSFinderFlags = 1024
    kMDItemFSInvisible = 0
    kMDItemFSIsExtensionHidden = 0
    kMDItemFSLabel = 0
    kMDItemFSName = "IMG_2521.JPG"
    kMDItemFSNodeCount = 0
    kMDItemFSOwnerGroupID = 501
    kMDItemFSOwnerUserID = 501
    kMDItemFSSize = 732201
    kMDItemFSTypeCode = 0
    kMDItemHasAlphaChannel = 0
    kMDItemID = 394378
    kMDItemKind = "JPEG Image"
    kMDItemLastUsedDate = 2006-08-09 14:22:34 -0700
    kMDItemOrientation = 0
    kMDItemPixelHeight = 1200
    kMDItemPixelWidth = 1600
    kMDItemProfileName = "Camera RGB Profile"
    kMDItemRedEyeOnOff = 0
    kMDItemResolutionHeightDPI = 180
    kMDItemResolutionWidthDPI = 180
    kMDItemUsedDates = (2006-08-08 22:32:49 -0700, 2006-08-08 17:00:00 -0700)
    kMDItemWhiteBalance = 0
    You can do a Spotlight search on any of the items listed. Thus, I could search and find this file with aperture and focal length, but not fnumber nor ISO.
    Francine
    Francine
    Schwieder

  • Edit/modify smart folder search

    Hi, I am trying to create a bunch of searches which share some of the same search criteria. So I would like to duplicate the smart folder and change just the search field. But how to I edit the smart folder? I have been looking around and some posts say click the 'show search criteria' but i can seem to find that the contextual options or in the finder menus?? Can someone help..
    OS X 10.9.5
    lister

    Where are you trying to do this - Finder, Mail...?

Maybe you are looking for

  • Conditional Formatting in RTF templates

    HI I am just going around with designing of rtf templates. I have a question regarding the conditional formatting feature. The question is IF i am having different type of customers(corporate,individual,etc..) passed as parameters, Can an particular

  • My Macbook Air is making a strange clicking noise and the startup sound no longer plays?

         I just noticed about 15 minutes ago, that whenever I turn on my Mac, every maybe 30-45 seconds it goes, "Click-Click-Click." I ran disk utility, and had it verify the disk, and it says everything is in the clear. I googled it, and someone had sa

  • Printing Margins - Reset Safari Library?

    I am having a problem printing documents from safari, from only 1 of my accounts on my macbook. The guest account has no problems printing. The problem is the same regardless what printer I print to. When told to print safari will format the document

  • MBP15 Desktop Colours Inverted???

    Boss Man has been fighting this for about a week on his Mac Book Pro 15in He uses a external 20 LCD Display as Primary monitor, and it has been working FIne foe 3 months... now in the last week when he starts the MBP and his desktop flashes up... it

  • Regarding execution of smartforms without a selection screen.

    Hi ,     I would like to know whether it is possible to generate a smart form, by calling a function module in a report program without the option of selection screen.Can anyone suggest me in this regard. Thanks in advance, Shwetha Korlepara.