- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use the -recursive parameter in Get-ChildItem using PowerShell?
To display the contents of the subfolders including files and folders, -Recurse parameter is used.
Command
Get-ChildItem -Path D:\Temp -Recurse
-Recurse parameter will not display the hidden files and folders.
Output
Directory: D:\Temp Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 13-12-2019 09:52 GPO_backup d----- 24-11-2018 11:31 LGPO -a---- 07-05-2018 23:00 301 cars.xml -a---- 29-12-2017 15:16 4526 healthcheck.html -a---- 29-12-2017 15:16 4526 healthcheck1.html -a---- 08-12-2017 10:24 48362 servicereport.html -a---- 08-12-2017 10:24 48362 servicereport1.html -a---- 08-12-2017 10:16 393 style.css -a---- 08-12-2017 11:29 7974 Test.xlsx -a---- 25-10-2017 08:13 104 testcsv.csv -a---- 12-12-2017 23:04 1034 testhtmoutput.html Directory: D:\Temp\GPO_backup Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24-11-2018 11:34 {C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24-11-2018 11:34 DomainSysvol -a---- 24-11-2018 11:34 6215 Backup.xml -a---- 24-11-2018 11:34 602 Bkupinfo.xml
- Related Articles
- What is the use of -Force parameter in Get-ChildItem in PowerShell?
- How to use Depth pararmeter in Get-ChildItem PowerShell?
- How to use the wildcard character (*) in Get-ChildItem in PowerShell?
- How to get the readonly files using Get-ChildItem in PowerShell?
- How to get the system files using the Get-ChildItem in PowerShell?
- How to list the subfolder contents using Get-ChildItem using PowerShell?
- How to use Get-ChildItem in PowerShell to filter a specific extension?
- How to exclude specific file names using Get-ChildItem in PowerShell?
- How to get only files but not the folders with Get-ChildItem using PowerShell?
- How to retrieve specific file(s) information using Get-ChildItem in PowerShell?
- How to search for a specific extension using Get-ChildItem in PowerShell?
- How to control recursion in Get-ChildItem in PowerShell?
- How to use the ErrorAction parameter in PowerShell?
- How to exclude specific extension in Get-ChildItem in PowerShell?
- How to get only folders but not the files in the Get-ChildItem in PowerShell?

Advertisements