quote:
Originally posted by SmokingCookie
That does it; I guess that using the result object in the loop changes the references stored in the array..?
Not exactly, you are changing the handle of the directory you are searching.
So you said find me the files in folder XYZ, it finds the first file as "." then you said find me the next file in XYZ and it found ".." but then you changed the handle of the object you were searching from XYZ to "..". Does that make sense?
If it doesn't make sense here is some pseudo since I am now on a computer and not my iPad:
This is what you should be doing
FindFirstFile ('XYZ')
> retval = 1
FindNextFile(1)
> retval = 100
FindNextFile(1)
> retval = 100
What you are doing is this
FindFirstFile ('XYZ')
> retval = 1
FindNextFile(1)
> retval = 100
FindNextFile(100)
> retval = 18 (no more files)
Hope that clears things up a bit.
Post 8000 w00t!