Summary: Learn how to use Windows PowerShell to find folders with names that match a specific pattern.
How can I use Windows PowerShell to find the path to folders that have names that match a specific pattern?
Use the Get-ChildItem cmdlet and the –Filter parameter with a pattern that matches the name, and then
specify the –Directory parameter. Here is an example that matches folders that have a four-letter name:
Get-ChildItem E:\Data\ScriptingGuys -filter "????" -Directory |
% { $_.fullname }