How to display files/folders including hidden files/folders in PowerShell?


To display files along with hidden files, you need to use –Force parameter.

Command

Get-ChildItem D:\Temp\ -Force

Output

If you see the above output, hiddenfile.xlsx is the hidden file and same can be identified with the mode where –a-h—attribute of the file.

You can also use this parameter with –Recurse or –Depth.

Get-ChildItem D:\Temp\ -Recurse -Force

Updated on: 23-Jan-2020

385 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements