使用 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

 

posted @ 2019-07-19 13:41  poterliu  阅读(12235)  评论(0编辑  收藏  举报