3

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.

4
  • I'm not certain this is a true duplicate, or at least the other issue is happy to accept solutions I'm not sure really fit what I'm asking; creating links via a script for example feels a very messy way to do this. Do smart folders still lack any means of combining results (e.g - an OR) for two searches?
    – Haravikk
    Commented Jan 26, 2015 at 13:05
  • 1
    I've actually found a capability in mdfind that kind of covers this; I can do mdfind -onlyin /Applications -onlyin ~/Applications 'kind:App' which at least combines the results, but there's no obvious way to do this as a smart folder.
    – Haravikk
    Commented Jan 28, 2015 at 11:03
  • The problem is Applications is a special case of a Smart Folder already. It pulls items from multiple locations… in general, what you ask is doable but in specific you may face extra challenges to gather the correct multiple folders since it’s not just two sources.
    – bmike
    Commented Nov 9 at 17:18

1 Answer 1

0

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.

2
  • 2
    Can you add some details about the file you are showing, how to create one, where to find it etc.?
    – nohillside
    Commented Aug 21, 2020 at 8:34
  • 1
    You need to create a shared folder and save it. For OP's use case, search for Kind = "Application" and save. Then, open the saved smart folder with a text editor and add the array of directories to the SearchScopes key. The solution worked for me.
    – altabq
    Commented Jul 18, 2023 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .