Reputation: 36639
I am trying to find all files matching the wildcard *\dev\*\*\*\Results_local.xml
in a cmd script, but I failed. I tried:
for %%f in (*\dev\*\*\*\Results_local.xml) do (
echo %%f
)
but it doesn't return any results. What should I do instead?
Upvotes: 0
Views: 116
Reputation: 79982
dir /s/b /a-d Results_local.xml |findstr /i /b /r ".*\\dev\\.*\\.*\\.*\\"
should give you a results list.
for /f "delims=" %%f in (
'dir /s/b /a-d Results_local.xml ^|findstr /i /b /r ".*\\dev\\.*\\.*\\.*\\"'
) do echo %%f
should apply the results to %%f one-by-one.
Upvotes: 2