Simple code...
Works great usually, but when the number of matches gets too big (I think around 30-40, not certain though), the process never ends and my program goes into an infinite loop. (MsgBox's only there for debugging purposes).
Anyone have an idea or a workaround?
Code:
Set wshShell = WScript.CreateObject("WScript.Shell")
dirCmd = "cmd /c dir /s /b /O-D buildlog.htm"
Set X = wshShell.Exec(dirCmd)
Do While X.Status = 0
MsgBox "Looping..." & X.Status
WScript.Sleep 1000
Loop
MsgBox "Out of loop"
Works great usually, but when the number of matches gets too big (I think around 30-40, not certain though), the process never ends and my program goes into an infinite loop. (MsgBox's only there for debugging purposes).
Anyone have an idea or a workaround?