Listing only files with a specific extension by DIR command
Listing only files with a specific, exact extension by DIR and FINDSTR commands in Windows Command Prompt. Like only .xls not .xlsx, or only .htm not .html:
DIR /B *.htm | FINDSTR .htm$
Note: Using just dir /b *.htm lists files with both .htm and .html extensions.
Operating systems
- Windows