How do you match an exact file extension under Windows/command line/file open dialog?
问题 I am trying to get a directory listing of only files with a given extension. At first blush this seems to be a simple thing to do, however check out this simple example: C:\CODE\metcal>dir /b *.exe metcal.exe metcal.exe1 Notice that this returns metcal.**exe** and metcal.**exe1** as matches. With python files a similar thing happens: C:\CODE\metcal>dir /b *.py metcal.py metcal.pyc Notice again Windows has determined that *.py takes anything that starts with *.py so it captures the .pyc files