Enable XRayFolders for a Preview of a Folder's Contents

Delve Into a Folder's Contents Without Opening the Folder

Quick Look is a handy system feature that lets you instantly preview a file's contents without actually opening the file. You can easily flip through multipage documents, view images, and even watch full-screen videos.

When you use Quick Look on a folder in Snow Leopard, it just displays a generic icon for the folder, the number of files inside the folder, and the total space used. Helpful, but hardly worth the effort.

When you invoke Quick Look on a folder in earlier beta versions of OS X 10.6, the folder's contents are revealed, with individual thumbnails of each file in the folder displayed in an animated slide show within the selected folder's icon. Pretty nifty, huh? For some reason, Apple chose to disable this functionality in the shipping version of Snow Leopard. Luckily, you can restore the original Quick Look implementation with a quick trip to the Terminal application.

This tip only works for OS X Snow Leopard, and very early versions of OS X Lion.

Enable Quick Look's XRayFolders Capability

Launch Terminal, located at /Applications/Utilities.

Enter the following text at Terminal's command prompt. You can copy/paste the command or type it in manually. Either way, this is a single line of text; characters are case sensitive.

Defaults write com.apple.finder QLEnableXRayFolders 1

Press return or enter, depending on your keyboard layout, to execute the command.

The Finder needs to restart before you will see the affect of the XRayFolder command. You can either restart your Mac or simply enter the following into Terminal: 

killall Finder

Press return or enter.

Using Quick Look With XRayFolders

Enabling Quick Look's XRayFolders doesn't change how you use Quick Look. To see the new feature in action, highlight a folder on your desktop or in a Finder window, and press the space bar. The Quick Look preview of the selected folder will display, with the folder's icon showing thumbnails of the documents contained within the folder.

You can exit a Quick Look preview by clicking the close button or pressing the space bar again.

Disable Quick Look's XRayFolders Capability

Decided you don't like the XRayFolders feature? You can turn the capability off by entering the following command in Terminal:

Defaults write com.apple.finder QLEnableXRayFolders 0

Press return or enter, depending on your keyboard layout, to execute the command.

Once again, be sure and restart the Finder by entering:

killall Finder

And hitting return or enter on your keyboard.

That's it. You can now turn XRayFolders on or off, as you wish. Enjoy your new super powers!