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.)
zip
in the name. If that's the case and I haven't misunderstood your objective, why isn't it sufficient to do the obvious and just add the.exe
extension to your pattern, e.g.,dir *zip*.exe
..rar
,.zip
,.exe
, etc. hence the title and question specifically asking about files.zip
except in the extension?