CODE: [Copy to clipboard]@echo off for /f "tokens=1* delims=]" %%a in (a.txt) do ( echo #EXT:,%%a] %%~nb echo %%b ) pause