>lExceeded=.F. >TRY > nFiles=ADIR(aTheFiles,"X:\MyPath\*.*") >CATCH > * Too many files. Limiting the scan to max files retrieved. > lExceeded=.T. > nFiles=INT(ALEN(aTheFiles) / 5) > IF nFiles > 0 > DIMENSION aTheFiles(nFiles,5) > ENDIF >ENDTRY >* Check lExceeded to determine the outcome of adir() >Why not use sys(2000) and be able to scan all files without exceeding such a limit? ;)