Often you may want to use the command Get-ChildItem -Recurse in PowerShell to recursively retrieve all filenames from a directory and display the results in one output table.
This particular example will return the full path of each .txt file in the current directory and all subfolders.
-Recurse *.txt
Notice that this returns information about each .txt file in the current directory, separated by the individual subfolder names.

Notice that this returns only the full path of each .txt file in the current directory and all subfolders, grouped together in a single output table.
Note that you can also use return as many properties as you’d like by using the Select statement:

Feel free to include whatever properties you’d like in the Select statement.
PowerShell: How to Use Get-ChildItem with Filter
PowerShell: How to Use Get-ChildItem with Multiple Filters
PowerShell: How to Use Get-ChildItem to Get Full Path of Files
PowerShell: How to Use Get-ChildItem to Return Files Only




