---
title: "BAT 批处理拷贝整个文件夹到别的文件夹下"
author: "onestopweb"
date: "2018-10-19T10:30:41Z"
tags: []
categories: ["编程语言"]
slug: "bat"
draft: false
lastmod: "2018-10-19T10:30:41Z"
id: 2432415
url: "https://onestopweb.iteye.com/blog/2432415"
---

如何做一个批处理文件，将文件夹里的文件及文件夹复制到另一个文件夹

答案：使用bat的xcopy命令和copy命令

 

```
echo "begin"
xcopy /y J:\battest\aaa\*.* J:\battest\bbb\ /s /e
copy /y J:\battest\111\onestopweb.txt J:\battest\222\onestopweb.txt
echo "end"
pause
```