我有这个令人困惑的文件夹,我是“所有者”,我拥有所有的NTFS权限: 它是不可见的 。 我想使它可见,而不必检查Windows资源pipe理器中的“隐藏受保护的操作系统文件”。
即使以“以pipe理员身份运行”,Powershell甚至不会让我看到该文件。
任何命令行工具,我可以使用? Windows资源pipe理器不会让见面取消隐藏它。 选项灰显。
如果你有完整的path,你可以尝试使用attrib从文件夹中删除系统/隐藏属性。
attrib -s -h
Get-ChildItem -Force会显示你的文件夹。
在PowerShell中取消隐藏目录:
(get-item -force <name-of-directory>).Attributes = ''
别名:
(gi -fo <name-of-directory>).Attributes = ''
我用这篇文章作为参考,简化了一下这个语法。
尝试删除隐藏的属性,同时保留所有其他广告的定义:
$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__)
你也可以尝试这个简单的Windows脚本来取消隐藏文件和目录。 说明如何使用它可以在下面的链接中find。
用于取消隐藏隐藏文件和文件夹的Windows脚本