Thank you for your suggestions and ideas Patrick.
I had to add another line to that hardcoded team mess, on the last line, so that UserNames that don't have Team_UserName will get captured.
Code:
Team_Name = MyArray(1)
arrMyTeamName = Split(Team_Name,"_",-1,1)
if arrMyTeamName(0) = "gd" Then UserName = Team_Name End If
If arrMyTeamName(0) = "Free-DC" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "AMDUsers" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "ArsTechnica" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "XtremeSystems" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "Team_Italia" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "XGrubbersKickAss" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "Ukraine" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "Singapura" Then UserName = arrMyTeamName(1) End If
If arrMyTeamName(0) = "RaidersOfTheLostPrime" Then UserName = arrMyTeamName(1) End If
UserName = Team_Name
Can we open another file called Teams.dat perhaps, load that into an array, close file.
Then use the arrTeams to see if any match arrMyTeamName(0)?
I can't remember the code to easily do that efficiently and cleanly.
I'll do a better job of file handling to ensure we don't get input/output file name collisions.
I ran a test run with what I have, and it completes over 40,000 lines in under a second, so I'm very pleased with the performance, just trying to be a better programmer and learn some tips and tricks along the way.
BTW, this is my FIRST useful vbscript I've written.
Thank you again for your time!
:cheers: