Your code demonstrates one of the "don'ts" in mIRC coding. Using $findfile within a loop like that is incredibly inefficient. $findfile has its own looping mechanism (as demonstrated above) which is the most efficient method you can use.

-genius_at_work