xFile = SYS(2000, "dirname\*.*" ) DO WHILE ! EMPTY(xFile) ?xFile xFile = SYS(2000, "dirname\*.*", 1 ) && the ",1" gets the next file ENDDO