Reputation: 131
The command dir ??p*p??.dll
gives me output like this:
I would expect it to return all files where the 3rd letter from the start and the 3rd letter from the end are a p
.
Any ideas?
Upvotes: 1
Views: 614
Reputation:
As AlexK correctly states the wildcard character ?
matches the end or .
To have a correct result in cmd filter with (by default regex based) findstr.
In a RegEx the .
is similar to ?
and .*
(any number of dots) to wildcard *
^
anchors at begin, $
achors at the end. A literal dot has to be escaped \.
> dir /B "C:\windows\system32\??p*p??.dll" |findstr "^..p.*p..\.dll$
Apphlpdm.dll
AppointmentApis.dll
mfperfhelper.dll
SrpUxNativeSnapIn.dll
Upvotes: 2