PowerShell: List Files with Specific Attribute

By Xah Lee. Date: . Last updated: .

List files that have certain attributes

# list file or 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 the following operators:

🛑 WARNING: No space allowed, except after comma.

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

PowerShell. File Properties, Attributes, Permission