使用 windows 批處理指令(BAT文件)進行文件刪除、復制操作


 以下是做文件刪除和復制的批處理指令

::替換文件需要添加 /y 參數才能直接替換.不然會出現提示是否替換.

::復制Axis2Implementation和WebServices編譯后的文件到tomcat的webapps\axis2\WEB-INF\services和modules目錄下
@echo off
echo "先刪除tomcat對應目錄下的三個舊文件:Rdu-v1_0.aar、Log4JInit.aar、durLicense.mar"
del /f /s /q C:\xxx\RDUService\webapps\axis2\WEB-INF\services\Rdu-v1_0.aar
del /f /s /q C:\xxx\RDUService\webapps\axis2\WEB-INF\services\Log4JInit.aar
del /f /s /q C:\xxx\RDUService\webapps\axis2\WEB-INF\modules\durLicense.mar
echo.
echo "復制 WebServices的Rdu-v1_0.aar到tomcat的webapps\axis2\WEB-INF\services 目錄下"
copy /y C:\Development\2015.09.16.2.0\WebServices\Source\Implementation\RDU-WS\deploy\Rdu-v1_0.aar C:\xxx\RDUService\webapps\axis2\WEB-INF\services\

echo "復制 Axis2Implementation的Log4JInit.aar到tomcat的webapps\axis2\WEB-INF\services 目錄下"
copy /y C:\Development\2015.09.16.2.0\Axis2Implementation\Source\Implementation\ServiceLib\deploy\Log4JInit.aar C:\xxx\RDUService\webapps\axis2\WEB-INF\services\


echo "復制 Axis2Implementation的durLicense.mar到tomcat的webapps\axis2\WEB-INF\modules 目錄下"
copy /y C:\Development\2015.09.16.2.0\Axis2Implementation\Source\Implementation\ServiceLib\deploy\durLicense.mar C:\xxx\RDUService\webapps\axis2\WEB-INF\modules\

 

 原文地址:

https://www.cnblogs.com/poterliu/p/11212772.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM