How to prevent command line wildcard processor from evaluating short file names

I'm developing a batch file within which I'm using the following pattern:

*.res

I want to select all files with the extension .res, but this pattern is matching files with an extension of .resources also.

In other words, it acts like I'm specifying *.res* but I'm not.

Is there a way I can prevent the command line from evaluating short 8.3 filenames?


You'll have to iterate manually and exclude those files that don't match, for example like this:

for %%f in (*.res) do if [%%~xf]==[.res] (
    rem do something with %%f here
)