vbscript array setup

February 11, 2009 at 08:16:45
Specs: Windows XP
I have a text file with records containing a server name and bytes transferred. 100's of records but there will be maybe 150 different servers. I want to create an array with 1 element per unique server but I also want to total the bytes transferred for each unique server and have that total stored in the array too as the 2nd dimension. I've been trying to figure out how arrays work but not having much success. Can anyone help?. Thanks!

See More: vbscript array setup

Report •

February 16, 2009 at 06:45:31
dim a()
redim a(2,3) 'array of 3x4
dim i,j

for i=0 to ubound(a,1)
	for j=0 to ubound(a,2)
		a(i,j) = i*j
		wsh.echo "a("&i&","&j&")=" & a(i,j)

Report •
Related Solutions

Ask Question