There's one feature from Windows 7 that I sort of like (yeah, yeah, I know...) and would like to implement (differently) on OS X. It's what they call "Libraries". It allows you to have the contents of multiple on-disk directories show up in Windows Explorer (their version of the Finder, for any who've had the pleasure to never need to use Windows) as though they were one directory.

The way I'd like to use this is to have directories from multiple drives browsable as though they were all on one drive. So, for instance the following directories:

/Volumes/Portable Library/Resources/
/Volumes/FreeNAS Server/Resources/

would all be visible together as a single "Resources" directory. Ideally my ~/Resources would display the contents of the other two, but it wouldn't kill me if I had to use a different path, such as /Volumes/Combined/Resources/.

Is this possible to do somehow? Maybe using something like the mhddfs command? (That is mentioned here, but it is unclear from the answer whether it can be used in the way I'm describing: I want to merge directories across several drives, not the entire drives themselves. It also may not exist for OS X.) Also, when any given drive or file server is unavailable, it should handle it gracefully and not treat it as a failure, since my FreeNAS server will only be around when I'm home, and I won't always have various external drives plugged in.

(If you're wondering why I'd ever want to do this, take a different example: iTunes libraries. It would be nice to have the bulk of it on a file server, but have the most-played songs available on my MacBook Air.)

Can this be done?

  • 2
    IIRC this used to work via Smart Folders. Or saved searches? This sounds awfully familiar but I've never done it myself, so I don't have specific knowledge. – Jason Salaz Apr 5 '13 at 17:40
  • I don't see how that can work: Smart Folders give you the results of a recursive search for folders and files that match certain criteria. I don't want every single folder named "Resources" or "resources" (and there are 77 just in ~!), each with separate contents. I just want specific folders, and I want to display a merged view of their contents. – iconoclast Apr 5 '13 at 20:16
  • Just to be clear, you're specifically interested in including folders on mounted disks? I've got a solution, but it relies on folder actions, which means it's less suited for this scenario. I'll keep thinking. I think Jason's idea is on the right track; I'd suggest poking around the idea of Saved searches/smart folders. – Daniel Apr 5 '13 at 21:58
  • There is a search criterion called "Document Container" for Smart Folders/Saved Searches, but it doesn't appear to work at all. It completely fails to return any results. And besides that, searches don't give you the option of a boolean "OR". All criteria are treated as though they have "AND" between them all. – iconoclast Apr 6 '13 at 19:19
  • @DanielLawson: does your solution use folder actions to create symbolic links of e.g. /Volumes/Portable Library/Resources/ inside e.g. ~/Resources? – iconoclast Apr 6 '13 at 23:47

I was looking into doing this also today, and so far the only solution I've found is to use a smart folder, hacked to search multiple locations:

What you want to do is open one of your folders (eg. /Volumes/Portable Library/Resources/) hit CMD+F and then set your desired filtering. eg. I set mine to Kind > Folders.

Save the search as a smart folder (it doesnt matter where) then open up that smart folder in TextEdit and look for the following:

/Volumes/Portable Library/Resources/`

There will be multiple instances of the above string, you want to replace them all with new strings that contain the paths you want to search.

In your case it would look like this:

<string>/Volumes/Portable Library/Resources/</string>
<string>/Volumes/FreeNAS Server/Resources/</string>

Save the file, then when you open the smart folder it will display search results form all three folders.

If you use the column view in Finder you can move through these folders as if they are all together.

Unfortunately the downside of this is that its searching resursively, so you will get all the folders within your first three, plus any folders in those. I'm yet to find a way to disable recursive search yet...

You must log in to answer this question.

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