CODE: [Copy to clipboard] @echo off setlocal enableDelayedExpansion for /f "delims=" %%i in ('dir /s /b "*.htm"') do ( echo %%i ) pause