entre parenthèses Changed à enfermer entre guillemets
@Echo off&SetLocal EnableExtensions EnableDelayedExpansion
:: Search may be from Argument %1
Set Search=ottvmdx459
set "UFTAppServerNameList=ottvmdx355 ottvmdx389 ottvmdx452 ottvmdx406 ottvmdx461 ottvmdx489 ottvmdx502 ottvmdx520 ottvmdx526 ottvmdx588 ottvmdx533 ottvmdx537 ottvmdx566 ottvmdx569 ottvmdx573 ottvmdx265 ottvmdx354 ottvmdx360 ottvmdx364 ottvmdx030"
set "UFTDataServerNameList=ottvmdx356 ottvmdx390 ottvmdx453 ottvmdx459 ottvmdx462 ottvmdx490 ottvmdx505 ottvmdx523 ottvmdx527 ottvmdx590 ottvmdx535 ottvmdx563 ottvmdx567 ottvmdx571 ottvmdx592 ottvmdx266 ottvmdx358 ottvmdx361 ottvmdx365 ottvmdx031"
:: Postional
Set /A Pos=0
For %%A in (%UFTAppServerNameList%) Do Set "App[!Pos!]=%%A"&Set /A Pos+=1
Set /A Pos=0
For %%D in (%UFTDataServerNameList%) Do Call Set "%%D=%%App[!Pos!]%%"&Set /A Pos+=1
Set APP[
Set ott
If defined %Search% Echo Matching AppServer for DataServer %Search% is !%Search%!
If not defined %Search% Echo DataServer %Search% not in List
Le premier pour construit un tableau de pseudo App[x]
avec le AppServer numéro de postion et le contenu
Le second crée un environnement vars avec le nom du serveur de données et le contenu est le Appserver correspondant.
Les lignes Set APP[
et Set ott
sont juste pour démontrer les tableaux avec cette sortie raccourci:
App[0]=ottvmdx355
App[1]=ottvmdx389
App[2]=ottvmdx452
App[3]=ottvmdx406
App[4]=ottvmdx461
..
App[19]=ottvmdx030
ottvmdx031=ottvmdx030
ottvmdx266=ottvmdx265
..
ottvmdx459=ottvmdx406
..
ottvmdx590=ottvmdx588
ottvmdx592=ottvmdx573
Matching AppServer for DataServer ottvmdx459 is ottvmdx406
Cest tout à fait clair, comment les listes liées, postional ou est la mise en correspondance Appserver celui avec le numéro de DataServer ci-joint a diminué par un? – LotPings
Veuillez ne pas vandaliser votre message. a) Cela n'aide pas parce que l'historique d'édition est public et b) vous serez finalement arrêté. –
Pourquoi y a-t-il une balise "javascript"? –