PowerShell: List Files with Specific Attribute

By Xah Lee. Date: .

List files that have certain attributes

use -Attributes param of Get-ChildItem.

# list file/dir with attribute hidden or system
dir -Attributes hidden,system
list file hidden system 2022-02-23 xC4K
list file hidden system

You can combine any of the following attribute properties:

Using these operators: (No space allowed, except after comma.)

# list files that have certain attributes
Get-ChildItem -Attributes !Directory+!System+Encrypted, !Directory+!System+Compressed

PowerShell: File Attributes