You can try
dir /s | findstr .asf
Edit: I think this will help. This is my test.bat
@echo off for /f "usebackq TOKENS=*" %%i in (`dir /s /b *.txt`) do echo %%~nxi pause
/f usebackq says that whatever backquotes is executed as a dos command
TOKENS=* also parses file names with spaces.
echo %%~nxi - n only file names are listed, and x is only the extension. Combining both displays the file name and extension.
Edit: usebackq not required, a single quote can be used instead.
Sakthi kumar
source share