Batch 拷贝远程机器文件到本机指定目录下

net use * /del /yes
NET USE Y: \远程机IPd$  登录密码 /user:domain登录用户

set sourcePath="Y:DOAutomationTestautomation_do_scriptlibrary_soapuiCompare Test and Benchmark EnvironmentVersion 1direct"
set targetPath1="C:Program FilesSmartBearReadyAPI-1.9.0inscriptsdirect"
set targetPath2="C:Program FilesSmartBearReadyAPI-1.3.1inscriptsdirect"
del /Q %targetPath1%
del /Q %targetPath2%

pushd %sourcePath%
xcopy %sourcePath%*.groovy %targetPath1% /R /Y
xcopy %sourcePath%*.groovy %targetPath2% /R /Y


set sourcePath2="Y:DOAutomationTestautomation_do_scriptlibrary_soapuiJARs"
set targetPath4="C:Program FilesSmartBearReadyAPI-1.9.0lib"
set targetPath5="C:Program FilesSmartBearReadyAPI-1.3.1lib"

pushd %sourcePath2%
xcopy %sourcePath2%jsonassert*.jar %targetPath4% /R /Y
xcopy %sourcePath2%jsonassert*.jar %targetPath5% /R /Y


net use * /del /yes
pause

原文地址:https://www.cnblogs.com/kill0001000/p/7773134.html