1
這個問題與此有關:Get a folder path where is missing specified file into variable一點點......複製文件中指定的子文件夾的文件到另一個文件夾[批量]
我有一個空文件夾和第二個文件夾,其中是另一個文件夾中,有一些.class文件
Myfolder1\Folder1 - contains the class files
Myfolder2\ - empty
我嘗試這樣做:
set path=%%f (the variable from the last question)
xcopy %path%\*.class Myfolder2\ /s
是這樣的:
xcopy Myfolder1\Folder1\*.class Myfolder2\ /s
什麼需要的是對類文件複製到第二個文件夾,包括子文件夾,所以第二個文件夾應該是這樣的:
Myfolder2\Folder1\\[the class files]
有誰知道? (代碼不需要使用Xcopy)
感謝所有幫助。