How do you recursively remove the hidden attribute on files in Windows? If you are coming from a Linux background, you may be surprised to find out that you can do this from the crusty old Windows command line. Usually such power is reserved for, ahem, real shells and command-line tools which, until PowerShell came along, were sorely lacking on Windows. I mean, the Linux command line is so powerful, it must be possessed by a daemon or something.

In any case, there are a few good reasons (and probably some not-so good reasons) why you might need to recursively add or remove the hidden attribute on a bunch of files. If you ever find yourself in need of this, never fear! attrib is here!

First, open up a command prompt. Then “cd” into the directory where you want to start applying the attribute changes. Finally, enter the following command:
attrib -H /S
That will remove the hidden attribute from all files in the current directory, then it will recurse down to do the same thing in all the subdirectories. If you also want to remove the system attribute (which you cannot do in the file properties dialog), type this:
attrib -H -S /S
Easy! No extra app required. You can also add attributes and modify directories as well as files (I know, this much fun should be outlawed.) To get a list of options, enter:
attrib /?
Thanks. Works Perfect.
I would also suggest to do the following in order to make also the folders visible
attrib -H -S /S /D
Oh Yes It does work.!!
Now a days everyone wants different s/w tools to do things for them.
What if they are not handy?
Only tips like these come to our rescue.
I knew about attrib command and have used it few times.
But today when I had to reset the attributes of my pendrive with numerous folder/files/subfolder; I didn’t want to use attrib on each one .
I searched for a tool iReset. Guess what it did not do!!?
It didn’t not reset the contents of the folder I fed it.
Then when I read your tip I recalled that I could have used attrib recursively.
And my work done in a jiffy.
Thanks again
attrib -H /S says “Not resetting system” file and I don’t want to change the system bit. Fun.
Thank you very much!
Just FYI you have to remove Hidden and System together on a file that has both. You cannot remove only the “Hidden” attribute on a file with “System” set, and vice versa:
If a file has only the attribute H then type
attrib -H
If a file has only the attribute S (don’t think this actually happens) then type
attrib -S
If the file has both S and A, you MUST use the following, neither of the above will work.
attrib -H -S
Is there a way of filtering the type of file, such as *.xml?