lcWorkDir = getdir() lcBadFiles = "" on error llBadFile = .t. lnDBFs = adir( laDBFs, lcWorkDir + "*.dbf" ) for lnI = 1 to lnDBFs llBadFile = .f. use ( lcWorkDir + laDBFs[ lnI, 1 ] ) if llBadFile lcBadFiles = lcBadFiles + laDbfs[ lnI, 1] + chr(13)+chr(10) endif endfor strtofile( lcBadFiles, "c:\corrupt.txt" ) on errorI just put in front of the parm within ADIR(), then when opening the file via USE ...