批处理文件以递归方式复制目录 [英] Batch file to copy directories recursively

查看:24
本文介绍了批处理文件以递归方式复制目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 .bat 文件中递归复制目录?有这样的例子吗?

Is there a way to copy directories recursively inside a .bat file? Is an example of this available?

推荐答案

调查 xcopy,它将递归复制文件和子目录.

Look into xcopy, which will recursively copy files and subdirectories.

页面下方 2/3 处有示例.特别有用的是:

There are examples, 2/3 down the page. Of particular use is:

要将所有文件和子目录(包括任何空子目录)从驱动器 A 复制到驱动器 B,请键入:

To copy all the files and subdirectories (including any empty subdirectories) from drive A to drive B, type:

xcopy a: b:/s/e

这篇关于批处理文件以递归方式复制目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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