Windows: How turn off hidden attribute for all files and directories on a drive?

20,123

Solution 1

Unhide is designed specifically to address this symptom.

When run, it will unhide (-H) all +H files on the fixed disks of your computer. It will not, though, unhide any files that also have the +S attribute.

Refer to the Removal Guide for System Fix for further information.

Solution 2

I think attrib -H /S /D should do the trick.

Solution 3

You may also try this simple windows script for unhiding files and directories. It only prompts the user to input the drive letter then executes the vbscript.

Run your notepad, copy the code below, then save it as unhide.vbs

pc_drive = InputBox("Input drive letter" & vbnewline & "example: E:\", "Drive","E:\")
ryt = Right(pc_drive,2)
   If Len(pc_drive) <> 3 or ryt <> ":\" Then
   Call MsgBox("Either your input was invalid or the drive you specified doesn'texist",vbokonly,"Error")
End If

Set FSO = CreateObject("Scripting.FileSystemObject")
ShowSubfolders FSO.GetFolder(pc_drive)

Sub ShowSubFolders(Folder)
   str =""
   For Each Subfolder in Folder.SubFolders
      str =str & " " & Subfolder.Path
      subFolder.Attributes = 0
      ShowSubFolders Subfolder
   Next
End Sub

You could save it in your USB drive for more accessibility. Instruction how to use it can be found in the link below.

Windows Script For Unhiding Folders Hidden By Worm Virus

EDIT: provided the vbscript code.

Share:
20,123

Related videos on Youtube

Justin
Author by

Justin

Updated on September 18, 2022

Comments

  • Justin
    Justin almost 2 years

    My Windows 7 was recently infected by the system-fix.com virus and it hid all my files and directories. I believe I've removed the virus but I still can't find many files and programs.

    Is there a single command-line tool in Windows that can recursively turn off the hidden attribute for an entire drive?

  • 100rabh
    100rabh almost 12 years
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
  • Mr. Xymon
    Mr. Xymon almost 12 years
    I just edited my answer. I appreciate your suggestion.
  • 100rabh
    100rabh almost 12 years
    Thanks for taking the time and adding the content. The reason we ask to do this is to prevent content loss due to link rot. Cheers.