先决条件:我对具有文件夹读/写权限的系统具有VPN访问权限。
案例1:我正在从一个控制器执行四个不同的bat文件,该文件将从特定位置定义的远程系统中复制文件。
案例2:现在我想从我的机器上触发远程系统上的bat。
我想从中获取成功或错误消息,只是为了确认其状态。
我附上了案例1中的一些文件。
@echo "******************Tualatin-script.bat*************************"
@echo "*******************************************"
color B
@echo Author :- Madhur Gupta
@echo Creation Date :- 12 Mar 2018
@echo Project :- LAM Research Corp
@echo Create Folder Structure
@Echo Run this Batch file before every test
@echo "*******************************************"
@echo "********************************************"
@echo off
copy "\\LDTCIPLM01\PerfLogs\Logs\" "C:\Test_Results\Fremont\LDTCIPLM01\" /-y
copy "\\LDTCIPLM02\PerfLogs\Logs\" "C:\Test_Results\Fremont\LDTCIPLM02\" /-y
copy "\\LDTCIPLM03\PerfLogs\Logs\" "C:\Test_Results\Fremont\LDTCIPLM03\" /-y
copy "\\LDTCIPLM04\PerfLogs\Logs\" "C:\Test_Results\Fremont\LDTCIPLM04\" /-y
copy "\\a205276\PerfLogs\Logs\" "C:\Test_Results\Fremont\a205276\" /-y
copy "\\a3000146\PerfLogs\Logs\" "C:\Test_Results\Fremont\a3000146\" /-y
Exit
@echo "*******************************************"
@echo "*******************************************"
color B
@echo Author :- Madhur Gupta
@echo Creation Date :- 12 Mar 2018
@echo Project :- LAM Research Corp
@echo To Pull Data
@Echo Run this Batch file To Get Test Data
@echo "*******************************************"
@echo "********************************************"
title Main Controller
call /b Script\India-script.bat
@echo "*******************************************"
@echo "*******************************************"
call /b Script\Tualatin-script.bat
pause
@echo "************India-script.bat*******************************"
@echo "*******************************************"
color B
@echo Author :- Madhur Gupta
@echo Creation Date :- 12 Mar 2018
@echo Project :- LAM Research Corp
@echo Create Folder Structure
@Echo Run this Batch file before every test
@echo "*******************************************"
@echo "********************************************"
@echo off
copy "\\INDIPLMTEST01\PerfLogs\Logs\" "C:\Test_Results\India\INDIPLMTEST01\" /-y
copy "\\INDIPLMTEST02\PerfLogs\Logs\" "C:\Test_Results\India\INDIPLMTEST02\" /-y
copy "\\INDIPLMTEST03\PerfLogs\Logs\" "C:\Test_Results\India\INDIPLMTEST03\" /-y
copy "\\INDIPLMTEST04\PerfLogs\Logs\" "C:\Test_Results\India\INDIPLMTEST04\" /-y
copy "\\ind005558\PerfLogs\Logs\" "C:\Test_Results\India\IND005558\" /-y
Exit
Tualatin-script.bat放置在远程服务器上: I / P:从本地调用时,它会自动从另一台远程服务器中选择文件 预期输出: - 我需要知道它运行时出错或成功,错误可能无法访问或文件不存在。