How can I recursively clear the "Hidden" file flag on Windows Vista?

A friend's computer was recently infected with a virus.

I hope the virus has been removed successfully. But, it appears that the virus set the "Hidden" flag on most directories and files on the system.

What's the most convenient way to clear this flag from selected directories and their contents?


You are looking for the "attrib" command. Type attrib /? at a command prompt.

An example would be attrib -h *.* to remove the hidden attribute from all files in the directory, or attrib -h *.* /s to include subdirectories. Add the /d switch to reset the directories too.


Download and run unhide (http://download.bleepingcomputer.com/grinler/unhide.exe).

It is for use when viruses (particularly fake failing HDD alerts) hide your files as part of what it does.

Works a treat for the odd occasion when these things happen here.