Windows Command line: Unset hidden and system attributes for all hidden files

If you want to make in command line in windows all files and directories non-hidden attrib -s -h * will not work.


You didn't mention which OS are you using, but since the command that you used

attrib -s -h *

didn't work, I'm guessing you used it without administrator priviliges.

The method I use is:

Run command prompt (Start -> Run -> CMD for XP, or for Vista and 7 Start -> type CMD in search box, right click and run as Administrator), type the following command:

attrib -H -S D:\yourfolder\*.* /S /D

This will remove the Hidden and System attribute of all files in the yourfolder folder on the D: drive.

The /S and /D arguments are optional.

/S will recurse down into all sub folders and

/D will unhide the folders themselves if they have the System or Hidden attribute set.

I regularly use this to clean customer virus infected flashdrives, as some viruses tend to hide your files and replace them with infected copies of the virus itself.