April 5th, 2014

PowerTip: Use PowerShell to List Only Directories

Doctor Scripto
Scripter

Summary: Learn how to use Windows PowerShell to show all directories.

Hey, Scripting Guy! Question How can I use Windows PowerShell to list ONLY directories in a folder structure?

Hey, Scripting Guy! Answer Use Get-ChildItem on the target folder and specify the Directory parameter:

Get-ChildItem C:\Foo –recurse -directory

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback