How to: hide any file in Windows Vista

There are times when it pays to be extra cautious about the security of your data. You might be planning a surprise party or trip for a loved one and need to hide the preparations, or maybe you're simply worried about security. Whatever the reason, both Windows Vista itself and various third-party utilities can help to set your mind at ease.

Setting a file's hidden attributes

By default, Vista doesn't display hidden files or folder, and it's easy to change a file's attributes to 'hidden'. First, select the file or folder that you want to hide. Right-click on the file and select the Properties option from the pop-up menu.

A window with five tabs pops up. On the General tab, you'll see the Attributes section. Make sure that the Hidden tick box is selected. Now press the Advanced button, and if ticked, deselect the box marked 'Index this file for faster searching'.

Now dismiss the Advanced Attributes window and do the same to the File or Folder Attributes window. If you're making a folder hidden, a new pop-up window will appear, asking if you want to set the hidden attribute on all sub-folders and files, too. This is a good idea. It will protect any existing content if an administrator who knows the path into the top-level folder you're making invisible enters it by hand.

Notice that the file or folder doesn't actually disappear from view until you navigate away from the parent folder and press [F5] to refresh your view. Once you do, everything you set to hidden disappears. The question is: how do you get it back?

Viewing hidden files

To see the files or folders you've hidden, open up the Control Panel. Click on the Appearance and Personalisation section and locate Folder Options. One of the options here is Show Hidden Files and Folders. Selecting this produces a pop-up window of file viewing options.

Click the View tab and you'll see a list of advanced settings for file viewing options. On this list, you'll see the option Hidden Files and Folders. Under this are two choices, letting you either hide or show hidden files. If you can't see these options, click on the Hidden Files option to expand the view.

Select the option to show hidden files and dismiss the pop-up before refreshing your view of the folder containing your hidden data. It should all now be visible to your account, while remaining hidden to others who don't have the Show Hidden Files option set and have read access to the parent directory.

You can also simply hide folders from the Vista Indexing Service so that the search function can't find them. To do this, enter the phrase 'indexing options' into Vista's Search utility. This will bring up a pop-up window of the same name. Now press the Modify button and another window pops up, detailing all of the locations on the hard disk that the indexing service includes.

Now we need to drill down into the disk's folder structure to find the folder that shouldn't be included in the machine's index. To do this, first press the Show All Locations button at the bottom of the window.

Accept the resultant User Account Control warning that interrupts you, and the window duly changes to include the local disk. Double-click on this icon and you'll see that it's a tree structure. Navigate to the folder that you want to remove from the indexing service and deselect its accompanying tick box to enforce this.

However, simply setting the hidden attribute on files and folders and then de-indexing them isn't a very advanced way to protect your very sensitive files – and what about hiding running applications? What we need is a more active solution. This is where third-party software developers can help out.