DIR filenames that contain extensions
Posted
by
Synetech
on Super User
See other posts from Super User
or by Synetech
Published on 2012-12-03T17:32:46Z
Indexed on
2012/12/11
5:07 UTC
Read the original article
Hit count: 520
dir
I was just trying to check a dump-directory for any ZIP programs like PeaZip, NanoZip, etc. and ran into an odd problem that I have seen only a few times before.
I used the following command to list files whose filenames contain zip (e.g., nanozip.zip, peazip2.rar, winzip-beta.exe, etc.):
dir *zip*
This listed any files whose filenames contain zip, but also all files with a .zip extension (e.g., foobar.zip).
I then tried the following:
dir *zip*.*
This gave the same results.
Does anyone know of a way to get the expected results? (I know that for may be able to do it, but the output won’t be correct.)
© Super User or respective owner