@echo off set file_list=file_list.txt echo Generating file list... ( for /r %%i in (*) do echo %%i )> %file_list% echo File list generated. pause