[thelist] iteratively comparing to an array with VBScript

Joel D Canfield joel at spinhead.com
Fri Sep 10 18:25:10 CDT 2004

> 	You mean something like
> For Each someSuchThing In TheWhatever
> 	While i < UBound(myArray)
> 		If myArray(i) = someSuchThing Then 
> 			' do the fun stuff
> 			i = UBound(myArray)
> 		End If
> 		i = i + 1
> 	Wend
> Next

Not quite. My pseudo code would be

For each subfolder in folders
	if folder.name is in myArray
		do the stuff
	end if

So, how do I check to see if the current folder.name is in my array of
valid values? Guess that's my question: do I have to loop through the
array each time I check another folder, or is there a simpler way?


More information about the thelist mailing list