20140321

Reset hidden files (caused by a virus perhaps...) with powershell.

Thanks to Abdul Raheman for his little script:

$Filepath = Get-ChildItem -Recurse -path "G:\" -Force
$Filepath | foreach {$_.attributes -match "Hidden"} { $_.attributes="Archive"}


Mine doesn't work, dunno why :/ , someday I'll be able to check and make it work... :

$files = get-childItem G:\ -recurse -force | Where-Object {$_.mode -match "h"}
 foreach ($files in $file){ $file.attributes = $file.attributes -bxor [System.IO.FileAttributes]::Hidden }

0 comentarios:

Publicar un comentario

Con la tecnología de Blogger.