I am trying to locate a file using dir
and findstr
to be able to specify the extension and a pattern in the name.
For this, I use the following command:
for /f %%a in ('dir /b /s *.pm | findstr /i "MyPattern"') do (set "name=%%a")
The question has been mostly answered in here, here and in here.
But none of them applied to my case.