I have a master folder on my disk drive which contains 50 other folders. Now, I want to hide those 50 folders. I can simply right click and select "hide" attribute checkbox but I am looking for a faster way of doing this. Any recommendations?
Windows 8.
The accepted answer presents a potential security issue.
By overwriting the whole Attributes
bit field, please be aware that any other attribute previously defined on your file or folder (read-only, encryption, ...) will be silently removed.
Use a binary OR to prevent this behavior:
Get-Item .\your_folder -Force | foreach { $_.Attributes = $_.Attributes -bor "Hidden" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With