How to Hide or Unhide a Folder with All Sub-folders and Files

Hide or unhide a Windows folder with all its sub-folders and files in one go, using the attrib command from an elevated Command Prompt.

How to Hide or Unhide a Folder with All Sub-folders and Files

Unhide

The command: attrib -s -h "full path of folder\*" /s /d

First run command prompt as Administrator then paste above code (Replace full path of folder with realpath of the folder for example: c:\folder1)

Hide

Same as above only change -h with +h

Unhide

The command: attrib -s +h "full path of folder\*" /s /d

📝 A note from my own work, first published in 2020.

Akam Omer
Written by

Akam Omer

IT leader, engineer and security specialist from Erbil with 20+ years across higher education, telecoms, healthcare and government. Founder of BulkSMSIraq, VerifyWay and Kurd.ai.