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)
感谢所有帮助。