# Meaning of Mode column in Get-ChildItem

**URL:** <https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219>\
**Category:** PowerShell Help\
**Created:** [August 21, 2022, 7:24pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219 "2022-08-21T19:24:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MacNala](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@MacNala](https://forums.powershell.org/u/MacNala)\
**Post date:** [August 21, 2022, 7:24pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/1 "2022-08-21T19:24:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 21, 2022, 7:38pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/2 "2022-08-21T19:38:56Z")

</div>

> [@MacNala](#):
>
> but the r does not appear to mean read-only.

Why do you think that? 🤔

> **[File attribute](https://en.wikipedia.org/wiki/File_attribute)**
>
> File attributes are a type of meta-data that describe and may modify how files and/or directories in a filesystem behave. Typical file attributes may, for example, indicate or specify whether a file is visible, modifiable, compressed, or encrypted. The availability of most file attributes depends on support by the underlying filesystem (such as FAT, NTFS, ext4) 
> where attribute data must be stored along with other control structures. Each attribute can have one of two states: set and cleared. Att...

… and BTW: it would have only taken a few moments to figure that out with a test file. 🤷🏽‍♂️ 😏

---

<div class="post-metadata">

**Author:** ![MacNala](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@MacNala](https://forums.powershell.org/u/MacNala)\
**Post date:** [August 21, 2022, 8:16pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/3 "2022-08-21T20:16:16Z")

</div>

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—?

---

<div class="post-metadata">

**Author:** ![MacNala](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@MacNala](https://forums.powershell.org/u/MacNala)\
**Post date:** [August 21, 2022, 8:25pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/4 "2022-08-21T20:25:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 21, 2022, 8:25pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/5 "2022-08-21T20:25:59Z")

</div>

> [@MacNala](#):
>
> 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.

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

1. d - for directory
2. a - for the archive bit
3. r - for read-only
4. h - for hidden
5. s - for system

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 21, 2022, 8:29pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/6 "2022-08-21T20:29:41Z")

</div>

> [@MacNala](#):
>
> I retract the last posting I got confused by a duplicate named file.

… happens to the best of us … don’t worry … 🤟🏽 ☺

> [@MacNala](#):
>
> where is it documented I searched for Mode in Powershell 5.1 and 7.2.6 and found nothing that explains it.

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?

**Edit:**  
Maybe the documentation for the CMD command `attrib` is a little better for you

> **[attrib](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/attrib)**
>
> Reference article for the attrib command that displays, sets, or removes attributes assigned to files or directories.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:16pm UTC](https://forums.powershell.org/t/meaning-of-mode-column-in-get-childitem/20219/7 "2024-05-16T20:16:45Z")

</div>

Closed on May 16, 2024, 8:16pm UTC


