@echo off
cd /d "%~1"
for /r %%f in (*.txt) do (
echo %%~nxf
) >> "%~dp0list.txt"