dir /ad /s /b c:\startingPoint | findstr /l /e /c:"example\subpath\string"
dir folders (/ad
) from c:\startingPoint
and below (/s
) in bare format (/b
). Filter the list with findstr
, we only want the lines with the literal (/l
) "example\subpath\string"
(/c
) at the end of the line (/e
)
Adapt as needed