
以隐藏的D:\Ghost和D:\Ghost\Backup.GHO为例
cmd命令:
attrib +s +h +r /s /d D:\Ghost
attrib -s -h -r /s /d D:\Ghost
cd /d "D:\Ghost"
attrib +s +h +r /s /d *.*
attrib -s -h -r /s /d *.*
上面几句cmd命令对应的powershell命令如下
Get-Item -Path "D:\Ghost" -Force | ForEach-Object { attrib +H +S +R $_.FullName }
Get-Item -Path "D:\Ghost" -Force | ForEach-Object { attrib -H -S -R $_.FullName }
Set-Location -Path "D:\Ghost"
Get-ChildItem -Path "D:\Ghost" -Recurse -Force | ForEach-Object { attrib +H +S +R $_.FullName }
Get-ChildItem -Path "D:\Ghost" -Recurse -Force | ForEach-Object { attrib -H -S -R $_.FullName }powershell命令:Set-ItemProperty只能设置以下属性: Archive、Hidden、Normal、ReadOnly 或 System。
Set-ItemProperty -Path "D:\Ghost" -Name Attributes -Value Normal
Set-ItemProperty -Path "D:\Ghost\Backup.GHO" -Name Attributes -Value Normalpowershell命令:Clear-ItemProperty
Set-ItemProperty -Path "D:\Ghost" -Name Attributes Hidden
Clear-ItemProperty -Path "D:\Ghost" -Name Attributes
Clear-ItemProperty -Path "D:\Ghost\Backup.GHO" -Name Attributes如果没有Administrator权限,如此恢复
cmd:
TAKEOWN /F D:\Ghost /A /R /D Y
ICACLS D:\Ghost /T /grant :r Administrators:Fpowershell:
cmd.exe /c "TAKEOWN /F D:\Ghost /A /R /D Y"
cmd.exe /c "ICACLS D:\Ghost /T /grant :r Administrators:F" 可以通过系统本身修改属性(如果设置了五种属性中的System属性,则无法通过图形界面去除,只能通过命令行),也可以通过第三方文件属性修改器(搜了下有很多),比如UltraFileExternal.exe

类似的,也有专门修改文件3个时间戳的第三方工具,比如NewFileTime。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。