@echo off for /f "delims=" %%i in ('dir /a-d /b /s *') do echo %%~nxi>>文件名列表.txt