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.

  • Try "attrib" from a command window. – Carlos Garcia Nov 30 '10 at 12:54

If you have the full path, you can try using attrib to remove the system/hidden attributes from the folder.

attrib -s -h

|improve this answer|||||

Get-ChildItem -Force will show you the folder.

|improve this answer|||||

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.

|improve this answer|||||

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__) 
|improve this answer|||||

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.

Windows Script For Unhiding Hidden Files and Folders

|improve this answer|||||
  • Worked fine for me, added If Subfolder.Name <> "System Volume Information" Then after For Each Subfolder in Folder.SubFolders line to bypass 800A0046 Error (Permission Denied). – pymym213 Oct 29 '19 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.