
[已解決]批處理如何復(fù)制同盤不同目錄下的不同類型的文件到當(dāng)前目錄下指定文件夾中最后由 Cyccllee 于 -3-2 00:01自己寫了一個(gè)比較繁瑣的能實(shí)現(xiàn),其實(shí)不止幾個(gè)子文件夾,有很多。另:該.bat文件只能放在目標(biāo)文件夾下。樣本如下:set a=D:Total1set b=D:Total2set c=D:Total3for /r %a% %%i in (*.png) do (xcopy %%i .Photo /Y)for /r %b% %%i in (*.png) do (xcopy %%i .Photo /Y)for /r %c% %%i in (*.png) do (xcopy %%i .Photo /Y)for /r %a% %%i in (*.txt) do (xcopy %%i .document /Y)for /r %b% %%i in (*.txt) do (xcopy %%i .document /Y)for /r %c% %%i in (*.txt) do (xcopy %%i .document /Y)for /r %a% %%i in (*.mp3) do (xcopy %%i .Music /Y)for /r %b% %%i in (*.mp3) do (xcopy %%i .Music /Y)for /r %c% %%i in (*.mp3) do (xcopy %%i .Music /Y)不怎么精通For循環(huán),想問(wèn)問(wèn)大神們還有更簡(jiǎn)單的寫法么?

