MacOS – Combine Two Folders with Smart Folder

findermacossmart-folders

Okay, so one thing I've wanted to be able to do for ages now in OS X is to create or view a combined Applications folder that displays the contents of both /Applications and ~/Applications (assume it exists).

Now, I know LaunchPad can do this, but I'd still like to be able to do this in a regular Finder window, for example using a Smart Folder.

Is this possible, and if so, what are the steps for doing this (either in the Finder itself, or via command line)?

I've experimented for searches of my entire computer for all Applications, however this only returns the application bundles themselves, ignoring any enclosing folders. Really I just want top level items for each of the applications folders; for example, I'd like to see the /Applications/Utilities folder, not its contents.

Best Answer

check the code below and I will explain

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CompatibleVersion</key>
    <integer>1</integer>
    <key>RawQuery</key>
    <string>(((kMDItemKind == "Application"cd &amp;&amp; ! ( ((kMDItemDisplayName == "*aam*"cd || kMDItemAlternateNames == "*aam*"cd) || (kMDItemDisplayName == "*aas*"cd || kMDItemAlternateNames == "*aas*"cd) || (kMDItemDisplayName == "*lic*"cd || kMDItemAlternateNames == "*lic*"cd) || (kMDItemDisplayName == "*uninstall*"cd || kMDItemAlternateNames == "*uninstall*"cd) || (kMDItemDisplayName == "*setup*"cd || kMDItemAlternateNames == "*setup*"cd) || (kMDItemDisplayName == "*install*"cd || kMDItemAlternateNames == "*install*"cd)) ))))</string>
    <key>RawQueryDict</key>
    <dict>
        <key>FinderFilesOnly</key>
        <false/>
        <key>RawQuery</key>
        <string>(((kMDItemKind == "Application"cd &amp;&amp; ! ( ((kMDItemDisplayName == "*aam*"cd || kMDItemAlternateNames == "*aam*"cd) || (kMDItemDisplayName == "*aas*"cd || kMDItemAlternateNames == "*aas*"cd) || (kMDItemDisplayName == "*lic*"cd || kMDItemAlternateNames == "*lic*"cd) || (kMDItemDisplayName == "*uninstall*"cd || kMDItemAlternateNames == "*uninstall*"cd) || (kMDItemDisplayName == "*setup*"cd || kMDItemAlternateNames == "*setup*"cd) || (kMDItemDisplayName == "*install*"cd || kMDItemAlternateNames == "*install*"cd)) ))))</string>
        <key>SearchScopes</key>
        <array>
            <string>/System/Applications</string>
            <string>/Applications</string>
            <string>/Users/USERNAME/Applications</string>
        </array>
        <key>UserFilesOnly</key>
        <false/>
    </dict>
    <key>SearchCriteria</key>
    <dict>
        <key>FXCriteriaSlices</key>
        <array>
            <dict>
                <key>criteria</key>
                <array>
                    <string>com_apple_RawQueryAttribute</string>
                    <integer>104</integer>
                </array>
                <key>displayValues</key>
                <array>
                    <string>Raw query</string>
                    <string>(kMDItemKind == "Application"cd &amp;&amp; ! ( ((kMDItemDisplayName == "*aam*"cd || kMDItemAlternateNames == "*aam*"cd) || (kMDItemDisplayName == "*aas*"cd || kMDItemAlternateNames == "*aas*"cd) || (kMDItemDisplayName == "*lic*"cd || kMDItemAlternateNames == "*lic*"cd) || (kMDItemDisplayName == "*uninstall*"cd || kMDItemAlternateNames == "*uninstall*"cd) || (kMDItemDisplayName == "*setup*"cd || kMDItemAlternateNames == "*setup*"cd) || (kMDItemDisplayName == "*install*"cd || kMDItemAlternateNames == "*install*"cd)) ))</string>
                </array>
                <key>rowType</key>
                <integer>0</integer>
                <key>subrows</key>
                <array/>
            </dict>
        </array>
        <key>FXScopeArrayOfPaths</key>
        <array>
            <string>/System/Applications</string>
            <string>/Applications</string>
            <string>/Users/USERNAME/Applications</string>
        </array>
    </dict>
</dict>
</plist>

If you see the key SearchScopes then there you can add what paths to include.

So simple as that - then it can be done. To learn this I used HoudaSpot that saved it for me so I could learn how to set it up. So basically just open a pre-saved .savedSearch file and edit the contents with SearchScope key.