When I run PowerShell\'s Get-ChildItem on a directory (or any cmdlet that returns file system items), it shows a column called Mode
, like this:
Note that the mode you see is just a string representation of a bitfield enum
that hides in the Attributes
property. You can figure out what the individual letters mean by simply showing both side by side:
PS> gci|select mode,attributes -u
Mode Attributes
---- ----------
d----- Directory
d-r--- ReadOnly, Directory
d----l Directory, ReparsePoint
-a---- Archive
In any case, the full list is:
d - Directory
a - Archive
r - Read-only
h - Hidden
s - System
l - Reparse point, symlink, etc.