如何将特定模式的文件递归复制到 Windows 上的单个平面文件夹中? [英] How can I recursively copy files of a specific pattern into a single flat folder on Windows?

查看:9
本文介绍了如何将特定模式的文件递归复制到 Windows 上的单个平面文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将一组 DLL 和 PDB 文件递归地从一组文件夹复制到另一个文件夹中.我不想在目标文件夹中重新创建文件夹层次结构.我想使用内置的 Windows 工具,例如DOS 命令.

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 want to use built in Windows tools, e.g. DOS commands.

推荐答案

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

如果您要复制多个文件并且不想一直回答是",请在上述命令的末尾使用/Y.

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

这篇关于如何将特定模式的文件递归复制到 Windows 上的单个平面文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆