windows doc命令复制粘贴文件

# 删除前端文件
rmdir /s/q E:\yuanbo2019\public\static
del E:\yuanbo2019\public\index.html

@echo off
 
::被复制的源文件夹
set sourceDir=C:\Users\86189\code\yuanbo_ui_2019\dist\static\
::目标文件夹
set tarDir=E:\yuanbo2019\public\static\
 
::复制并覆盖文件及文件夹
xcopy %sourceDir% %tarDir% /s/y

::复制index文件 copy "源路径\*.*.xxx(xxx 文件后缀名)" "目标路径",搞定,具体可以用 copy /?
copy C:\Users\86189\code\yuanbo_ui_2019\dist\index.html E:\yuanbo2019\public\

pause

  

正心投入专注
原文地址:https://www.cnblogs.com/guiyishanren/p/15682795.html