DIR filenames that contain extensions
- by Synetech
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.)