문제

I would like to get all the paths that ends with a given suffix (like 'example/subpath/string') . Is there any simple way of doing it in Windows cmd?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top