Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer
Anyone know how to make the * show? It seems only to happen when you do STAR.STAR, not just one star. – KCotreau Jun 9 '11 at 23:08
Thanks for the answer! Hope you don't mind; I have proposed an edit to escape the asterisks. You can do that with backslashes, or by enclosing text with backquotes (which makes give it a style for code). – erickson Jun 9 '11 at 23:22
Thank you erickson. Looks great now. – KCotreau Jun 10 '11 at 0:16
You can also do this with -r (read only) -a (archive) -s (system) e.g. C:\Windows\System32\attrib.exe -r ..*.* /s /d see – Tod Thomson Dec 6 '13 at 1:13

Download and run unhide (

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .