将文件从源复制到目标的批处理命令

Batch command to copy files from source to destination

我需要将一组文件从源复制到目标,下面是我正在使用的命令,它工作正常。但是文件夹“29749659”是动态的,它的名字总是在变化。 "unzipped" 下只会存在一个文件夹。

xcopy /y C:\Nageswar\unzipped749659\files\products\Essbase\EssbaseClient\api\include\* C:\Jenkins\jobs\Planning\branches\develop\workspace\planning\Jni\include

有什么写命令的方法

for /d %%a in (C:\Nageswar\unzipped\*) do xcopy /y "%%a\files\products\Essbase\EssbaseClient\api\include\*" C:\Jenkins\jobs\Planning\branches\develop\workspace\planning\Jni\include

应该完成此操作 - for /d 扫描目标目录名称以查找目录名称,并将找到的每个依次应用到 %%a