PowerTip: Use PowerShell to Display Only Hidden Files

Summary: Use Windows PowerShell to display only hidden files.

Hey, Scripting Guy! Question How can I use Windows PowerShell to locate only hidden files?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet and specify the Not Directory and the Hidden attributes (abbreviate as !d+h):

gci -Att !d+h

Comments (2)

  1. Chen V says:

    Super tip. Thanks Ed!

  2. Murray Wall says:

    I like it – old school dir /ah /s –> gci -Att !d+h -r

Skip to main content