I have similar problems in a large script with multiple dir() functions whereby the second dir() causes a variable to be overwritten in the 26th position. This happens on a W2K Pro workstation using Kix 4.01.

I was able overcome the problem by using indexes as follows: dir(,1) for the first function and dir(,0) for subsequent functions. Any other combination of indexes does now work. Go figure!!