Hot answers tagged

4

In cmd you can do a: dir /a:d /b /s C:\*logs* Or if you've a recent-ish PowerShell version Get-ChildItem -Directory -Path C: -Recurse -Filter *logs* | Select-Object FullName


2

Powershell can deliver what you're after with the following: gci -r c:\temp | where {$_.psIsContainer -eq $true -and $_.name -match "logs"} | foreach { $_.fullname }



Only top voted, non community-wiki answers of a minimum length are eligible