I have some 10 number of batch files those batch files are calling from one main bat file. Now I want to run all those bat file on some remote server.
I used the following command to run my batch file to run on remote server
psexec \\10.47.36.182 -c C:\Users\SVCT\Desktop\samples\_main_script.bat
This is the following output I got while running the above command
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
The system cannot find the file C:\Users\SVCT-WI-Jenkins\Desktop\test.log.
The system cannot find the path specified.
C:\WINDOWS\system32>The system cannot find the path specified.
REM @Echo Off
The system cannot find the path specified. The system cannot find the path specified.
The following is my main batch file.
REM @Echo Off
SetLocal EnableDelayedExpansion
::This line is just in case n has been defined before the batch file is run
Set n=
Set InputFile=C:\Users\SVCT-WI-Jenkins\Desktop\test.log
For /F "tokens=*" %%I IN (%InputFile%) DO (
Set /a n+=1
Set var!n!=%%I
REM echo "%var!n!%"
)
EndLocal & (
set "cluster_check=%var1%"
set "servername=%var2%"
set "servername1=%var3%"
set "artifact_folder=%var4%"
)
call C:\Users\SVCT-WI-Jenkins\Desktop\Scripts_palani_new\samples\1_cluster_check.bat %cluster_check%
echo %enviroment%
echo %enviroment%
call C:\Users\SVCT-WI-Jenkins\Desktop\Scripts_palani_new\samples\2_server_connectivity.bat %servername%
Can someone help me to resolve this.. I've to run all my bat files on remote server