A better way to do that without having to duplicate the info would be:
Code:
set FtpNames "Server1Name Server2Name Server3Name ..."
...
set Ftp1 [GetFTPName $Ftp1]
set Ftp2 [GetFTPName $Ftp2]
...
proc GetFTPName {$Ftp} {
global FtpNames
set i 1
foreach name $FtpNames {
if {$Ftp == $name} {
if {$i>9} { return $i } else { return "0$i" }
}
incr i
}
return $Ftp
}