1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 17:55:23 +02:00
tldr/pages/windows/get-childitem.md

26 lines
622 B
Markdown
Raw Normal View History

2021-10-12 02:18:02 -04:00
# Get-ChildItem
> List items in a directory.
> This command can only be used through PowerShell.
2021-10-12 02:18:02 -04:00
> More information: <https://docs.microsoft.com/powershell/module/microsoft.powershell.management/get-childitem>.
- List all non-hidden items in the current directory:
`Get-ChildItem`
- List only directories in the current directory:
`Get-ChildItem -Directory`
- List only files in the current directory:
`Get-ChildItem -File`
- List items in the current directory, including hidden items:
`Get-ChildItem -Hidden`
- List items in a directory other than the current one:
`Get-ChildItem -Path {{path/to/directory}}`