Mark 脚本-20170310-bat 复制指定文件夹下所有内容到指定位置

来源:互联网 发布:php发送邮件代码 编辑:程序博客网 时间:2024/04/28 03:00

Requirement

复制指定文件夹下所有内容到指定位置

Code

@echo off@title copy directory to destination locationset root=C:\set "directory=%date:~0,4%-%date:~5,2%-%date:~8,2%"set "document=%root%%directory%"if not exist %document%    md %document%xcopy /s/e/y "C:\haha" "%document%\"exit

Reference

  • 将当前文件夹及文件夹下文件复制到指定位置bat
  • Xcopy命令参数使用介绍
  • 批处理判断文件夹是否存在
0 0