::放在主文件夹旁边@echo offfor /f %%a in ('dir /b /ad') do (cd %%a&for /f %%b in ('dir /b /ad') do(cd %%b&for %%c in (*.txt) do (ren %%c %%a)&cd ..)&cd ..)