侃侃无极
123@echo offfor /d /r "D:\某文件夹" %%i in (*) do echo %%i>>list.txtpause或者123@echo offfor /f "delims=" %%i in ('dir /ad/b/s "D:\某文件夹"') do echo %%i>>list.txtpause以上代码默认包含完整路径.如果只需要文件夹名而不需要路径可以用下面代码.123@echo offfor /f "delims=" %%i in ('dir /ad/b/s "D:\某文件夹"') do echo %%~ni>>list.txtpause