Using Get-ChildItem -Path 'E:' -Recurse gives listing of Directories and the childitems on Drive E. The columns are headed Mode, LastWriteTime, Length and Name. The meaning of the entries in the Mode column is not clear to me. The starting d seems to mean directory, the following, a I assume means archivable but the r does not appear to mean read-only. Could someone point me to the meanings.
Why do you think that?
… and BTW: it would have only taken a few moments to figure that out with a test file.
That was exactly what I did before raising the question. My evidence says it is not the read only attribute as I changed the property of one of the listed childitems to not be read-only and it still showed as r.
So what are the attributes that are shown on the childitems listing there are 3 dashes after the ar as in example -ar—?
I retract the last posting I got confused by a duplicate named file.
So the r means read-only but what are the others and where is it documented I searched for Mode in Powershell 5.1 and 7.2.6 and found nothing that explains it. I note there are more attributes in the cmdlet which can be used to restrict the find but there appear to be more than there are positions for them in the Mode column.
Hmmm … I don’t know what you did but you obviously did not change the read-only attribute … sorry.
The dashes in the output represent attributes when they ar e not set. The order is
- d - for directory
- a - for the archive bit
- r - for read-only
- h - for hidden
- s - for system
… happens to the best of us … don’t worry …
It’s not a PowerShell thing it is an OS file system thing. PowerShell only displays it. Did you take a look at the Wikipedia page I linked above?
Maybe the documentation for the CMD command
attrib is a little better for you