Smart Folders: What happens when several search results have the same file name

Posted by Pierre Igot in: Macintosh
July 27th, 2005 • 3:35 pm

Mac OS X 10.4 (Tiger) introduces the concept of “smart folders”, which are effectively file searches with live updating. When you create a smart folder in the Finder (or do a file search, which amounts to the same thing), you get a window with a list of search results.

This window is also, as the name indicates, a folder. As such, it should behave like regular folders. But there are problems.

For example, let’s say you do a search that returns several search results that have the same file name. In Mac OS X (and in previous versions of the OS), you cannot have two files with the same name in the same folder. But you can definitely have two files with the same name in a smart folder, since a smart folder gathers results from several different locations, where files with the same name can coexist peacefully.

But then, a smart folder is a folder. So in theory, you should be able, for example, to select the contents of the smart folder (with “Select All” or command-A) and drag them to a destination, in order to copy all the search results to a single physical folder.

But what happens if the search results include several files with the same name? They can coexist in the smart folder, but they cannot coexist in the same physical folder. Obviously, Mac OS X needs a graceful way to handle such a situation.

Unfortunately, it does not have one. Try the following experiment. Open a new Finder window and do a search for files named “index.html” on your hard drive. Chances are you have more than one file with this name, because it’s a very common one and there are many software titles that have a help feature in the form of a local web site with HTML files, including files named “index.html“.

On my computer, when I do such a search, I get about 30 files called “index.html” (along with other junk that contains “index” and “html” either in the file name or in the file itself). Hopefully you’ll get more than one such file on your system too.

Then select two of the files called “index.html” in the list of search results and drag them to your desktop. What you are doing is asking the Finder to copy these two files called “index.html” to the same location (your desktop). Since your desktop can only ever contain one file called “index.html” at any given time, obviously we’re going to have a problem.

How does the Finder handle it? It displays an alert box saying:

The selected items cannot all be put into the same location, because at least one of them named “index.html” is busy.

And the only option given to the user is to click on the “OK” button in that alert box, which effectively cancels the operation altogether.

Not only is the error message wrong (the file is not “busy”, there are two files with the same name!) but it doesn’t even offer the option to copy the two files by renaming one of them in order to avoid having two files with the same name in the same location.

This is far from being an elegant way of handling the situation. Come on, Apple, you can do better than this.

Then again, when you remember that early versions of Mac OS X’s Finder offered no “Replace All” option when copying multiple files to a location already containing files with the same name, you have to wonder… How hard do Apple engineers really try to get the small stuff right? When it comes to Mac OS X’s Finder, we have a long way to go, and Tiger doesn’t improve things, quite the contrary.

3 Responses to “Smart Folders: What happens when several search results have the same file name”

  1. ssp says:

    Good for waiting for the fix then…

    it’s a really tricky/messy problem which is bad enough as you describe it but even bigger and worse in total, seeing that the ‘files’ displayed in the smart folders don’t necessarily have the names displayed for them. So it’ll be really hard (if not impossible) to clearly and simply explain to the user what exactly the Finder is having a problem with…

    Changing the error message to “Sorry, I’m too stupid to do what you asked for without turning everything into a big mess” might be the way to go. At least it won’t leave the user quite as confused and clueless as the current message.

  2. Pierre Igot says:

    Yes, some results are not shown with the actual file name (e-mail messages and Address Book entries, for example). But when you drag-and-drop them, the actual files (with the esoteric file names) are copied. It’s the ugly side of Spotlight that is exposed (that is, the tricks that Apple have had to use to make Mail messages and AB entries searchable).

    Still, in that case the file names are unique, so there’s no problem with the drag-and-drop operation itself. (The user is left to deal with the mess of esoteric file names, but that’s another issue.) Not sure what Apple can do at this stage to “hide” the ugly file names, but they might have to come up with something in the future.

    Still, the problem I describe here is more immediate, because it affects even files that are shown with their actual file names. And wanting to copy the results of a given search to a specific location doesn’t strike as a very unusual operation.

  3. samuelrutledge says:

    Thanks for this post. We were getting the ‘selected items’ error message cited trying to drag a bunch of family photos out of iPhoto into a folder. You helped us realize what we were doing wrong. Much appreciated.

Leave a Reply

Comments are closed.