Why don't all of my documents show up when I arrange my Documents library by Name?
A customer reported that when they opened their Documents library on Windows 7, some files were missing if they selected Arrange by: Name or Arrange by: Author or in fact any arrangement other than Arrange by: Folder. What’s going on?
When you arrange the Documents library by anything other than Folder, the Documents library uses the content indexer to obtain results quickly, rather than kicking off a recursive disk search (ugh). (The Folder arrangement does not require a recursive search, so it can use the traditional
FindNextFile loop to get the results.
A member of the search indexer team suggested that a common cause for items being missing from the index is if they have the
FILE_ATTRIBUTE_TEMPORARY attribute set. The indexer ignores temporary files because the creator of the file said, “Don’t worry about me, this is just a temporary file that I will be deleting as soon as I close the handle.” No point indexing a file that is going to be deleted soon.
You can check whether the file has the Temporary attribute by viewing its Properties and going to the Details tab. If the file is marked Temporary, the Attributes will include the letter T. (Note that the
attrib program does not report the Temporary flag.)
Sure enough, the customer found that the files which were mysteriously missing from the view were all marked as Temporary files. This allowed the customer to proceed to the next step of the investigation, which is figuring out why those files were being marked Temporary in the first place.