How to unhide hidden NTFS folder? (option greyed out, maybe it's a system hidden folder)
Solution 1
If you have the full path, you can try using attrib to remove the system/hidden attributes from the folder.
attrib -s -h
Solution 2
Try this to remove only the hidden attribute, whilst leaving all others ad defined:
$Path = 'c:\MyDemoFile.txt'
#use -force switch with get-item so we find the file even if it's hidden
$Item = (get-item $Path -force)
#use a boolean operation to remove the Hidden attribute if it's assigned; whilst keeping all other attributes as defined.
$Item.Attributes = $Item.Attributes.value__ -band (-bnot [System.IO.FileAttributes]::Hidden.Value__)
Solution 3
To unhide the directory in PowerShell:
(get-item -force <name-of-directory>).Attributes = ''
With aliases:
(gi -fo <name-of-directory>).Attributes = ''
I used this article as a reference and simplified the syntax a bit.
Solution 4
Get-ChildItem -Force will show you the folder.
Solution 5
You may also try this simple windows script for unhiding files and directories. Instruction how to use it can be found in the link below.
Related videos on Youtube
Malartre
Creative web entrepreneur, CEO at Scolab.com. Working full time on educational projects like Buzzmath.com, Netmaths.net (French), GraphingStories.com.
Updated on September 17, 2022Comments
-
Malartre over 1 year
I have this perplexing folder that I'm the "Owner" and I have all NTFS rights on it: it's invisible. I would like to make it visible without having to check the "Hide protected operating system files" in Windows Explorer.
Powershell does not even let me see the file, even with Run as Administrator.
Any command line tool I can use? Windows Explorer will not let met unhide it. Option is greyed out.
-
pymym213 over 4 yearsWorked fine for me, added
If Subfolder.Name <> "System Volume Information" Then
afterFor Each Subfolder in Folder.SubFolders
line to bypass800A0046
Error (Permission Denied).