snippetbashTip
Get-ChildItem — List items in a directory. Note: This command can only be used through PowerShell. More information:
Viewed 0 times
directorycommandnotethiscliget-childitemitemslist
windows
Problem
How to use the
Get-ChildItem command: List items in a directory. Note: This command can only be used through PowerShell. More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-childitem>.Solution
Get-ChildItem — List items in a directory. Note: This command can only be used through PowerShell. More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-childitem>.List all non-hidden items in the current directory:
Get-ChildItemList only directories in the current directory:
Get-ChildItem -DirectoryList only files in the current directory:
Get-ChildItem -FileList items in the current directory, including hidden items:
Get-ChildItem -HiddenList items in a directory other than the current one:
Get-ChildItem -Path {{path\to\directory}}Code Snippets
List all non-hidden items in the current directory
Get-ChildItemList only directories in the current directory
Get-ChildItem -DirectoryList only files in the current directory
Get-ChildItem -FileList items in the current directory, including hidden items
Get-ChildItem -HiddenList items in a directory other than the current one
Get-ChildItem -Path {{path\to\directory}}Context
tldr-pages: windows/Get-ChildItem
Revisions (0)
No revisions yet.