使用 windows 批处理指令(BAT文件)进行文件删除、复制操作

 以下是做文件删除和复制的批处理指令

::替换文件需要添加 /y 参数才能直接替换.不然会出现提示是否替换.

::复制Axis2Implementation和WebServices编译后的文件到tomcat的webappsaxis2WEB-INFservices和modules目录下
@echo off
echo "先删除tomcat对应目录下的三个旧文件:Rdu-v1_0.aar、Log4JInit.aar、durLicense.mar"
del /f /s /q C:xxxRDUServicewebappsaxis2WEB-INFservicesRdu-v1_0.aar
del /f /s /q C:xxxRDUServicewebappsaxis2WEB-INFservicesLog4JInit.aar
del /f /s /q C:xxxRDUServicewebappsaxis2WEB-INFmodulesdurLicense.mar
echo.
echo "复制 WebServices的Rdu-v1_0.aar到tomcat的webappsaxis2WEB-INFservices 目录下"
copy /y C:Development2015.09.16.2.0WebServicesSourceImplementationRDU-WSdeployRdu-v1_0.aar C:xxxRDUServicewebappsaxis2WEB-INFservices

echo "复制 Axis2Implementation的Log4JInit.aar到tomcat的webappsaxis2WEB-INFservices 目录下"
copy /y C:Development2015.09.16.2.0Axis2ImplementationSourceImplementationServiceLibdeployLog4JInit.aar C:xxxRDUServicewebappsaxis2WEB-INFservices


echo "复制 Axis2Implementation的durLicense.mar到tomcat的webappsaxis2WEB-INFmodules 目录下"
copy /y C:Development2015.09.16.2.0Axis2ImplementationSourceImplementationServiceLibdeploydurLicense.mar C:xxxRDUServicewebappsaxis2WEB-INFmodules

 原文地址:

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

原文地址:https://www.cnblogs.com/poterliu/p/11212772.html