
Eu tenho cerca de 10 arquivos em lote que esses arquivos em lote estão chamando de um arquivo bat principal. Agora quero executar todos esses arquivos bat em algum servidor remoto.
Usei o seguinte comando para executar meu arquivo em lote no servidor remoto
psexec \\10.47.36.182 -c C:\Users\SVCT\Desktop\samples\_main_script.bat
Esta é a seguinte saída que obtive ao executar o comando acima
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
O sistema não consegue encontrar o caminho especificado. O sistema não consegue encontrar o caminho especificado.
A seguir está meu arquivo em lote principal.
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%
Alguém pode me ajudar a resolver isso. Tenho que executar todos os meus arquivos bat no servidor remoto