How to recursively search a directory for all files including hidden files in hidden directories, with PowerShell?
You're doing it right. Just run it in an elevated console and remove the filter. If you don't care about permission errors, append -ErrorAction SilentlyContinue
:
Get-ChildItem -Path C:\ -Filter lush* -Recurse -Force ` -ErrorAction SilentlyContinueDirectory: C:\Mode LastWriteTime Length Name---- ------------- ------ -----arhs 25.09.2013 12:16 1208 lush.asx
lush.asx
has the ReadOnly, Hidden and System attributes.
You may also want to pipe to | select Name, Length, Directory
to get rid of that unfortunate Directory: C:\
line. There's also a DirectoryName
if you want the full path without the filename.