2

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.

1
  • Try "attrib" from a command window. Commented Nov 30, 2010 at 12:54

5 Answers 5

3

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

attrib -s -h

4

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__) 
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.

2

Get-ChildItem -Force will show you the folder.

1

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

1
  • 1
    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
    Commented Oct 29, 2019 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .