I don't trust Dir$ in this case, I assume it isn't update-safe. The folder is changed while reading it.
Can you get all *.BAT files first, e.g. read them into an array or List, and then call each of them?
Example:
Dim filenames List As String
fileName$ = Dir$(pathName$, 0)
Do Until fileName$ = ""
filenames(filename$)= filename$
fileName$ = Dir$()
Loop
ForAll f in filenames
...
End ForAll