R
Richhall
Guest
Hi
I want to be able to use a user defined variable to then call a
previously set variable based on the value entered by the user. Is
this possible?
e.g I have variables
set IP0 xxx.xx.xx.xxx
set IP1 xxx.xx.xx.xxx
set IP2 xxx.xx.xx.xxx
set IP3 xxx.xx.xx.xxx
set IP4 xxx.xx.xx.xxx
If the user is prompted for a number
set /p NO=Enter Workstation Number: - user enters 4
set TEMP=IP%NO% - so this is now IP4
How do I now get it to use variable IP4?
i.e
copy \\%IP4%\\logs .........
As if I do copy \\%temp%\\logs it goes to IP4 not the IP address.
Cheers
Rich
I want to be able to use a user defined variable to then call a
previously set variable based on the value entered by the user. Is
this possible?
e.g I have variables
set IP0 xxx.xx.xx.xxx
set IP1 xxx.xx.xx.xxx
set IP2 xxx.xx.xx.xxx
set IP3 xxx.xx.xx.xxx
set IP4 xxx.xx.xx.xxx
If the user is prompted for a number
set /p NO=Enter Workstation Number: - user enters 4
set TEMP=IP%NO% - so this is now IP4
How do I now get it to use variable IP4?
i.e
copy \\%IP4%\\logs .........
As if I do copy \\%temp%\\logs it goes to IP4 not the IP address.
Cheers
Rich