79578811

Date: 2025-04-17 08:38:08
Score: 0.5
Natty:
Report link

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
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: D.Bugger