How can I recursively copy files of a specific pattern into a single flat folder on Windows?

前端 未结 6 1217
别跟我提以往
别跟我提以往 2020-12-04 09:47

I need to copy a set of DLL and PDB files from a set of folders recursively into another folder. I don\'t want to recreate the folder hierarchy in the target folder. I wan

6条回答
  •  無奈伤痛
    2020-12-04 10:23

    mkdir targetDir
    for /r %x in (*.dll, *pdb) do copy "%x" targetDir\
    

    Use /Y at the end of the above command if you are copying multiple files and don't want to keep answering "Yes".

提交回复
热议问题