The file-loop won't be quitted if the condition is fulfilled after the loop has stepped into recursion.
Sample by HotKeyIt:
Code: Select all
Loop,C:\a*.*,0,1
{
x+=1
MsgBox % x "-" A_Index
}until x>2 ; set the value to a number greater than the amount of files starting with 'a' on C:\
MsgBox % x]