@echo off
for /d %%i in (c:\*) do (
echo %%i
for /d %%j in (%%i\*) do (
echo %%j
copy "c:\swb.txt" %%j
)
)
pause
循环c盘下的所有目录,向所有子目录的下一层子目录中拷贝文件swb.txt
@echo off
for /d %%i in (c:\*) do (
echo %%i
for /d %%j in (%%i\*) do (
echo %%j
copy "c:\swb.txt" %%j
)
)
pause
循环c盘下的所有目录,向所有子目录的下一层子目录中拷贝文件swb.txt