Worm example by Charlie Schreiner FileName = "FileList" CREATE TABLE (m.FileName) (FileName M, Path M, DateTime T, Size N(9)) CurPath = "C:\Common\" RequerySys(m.CurPath) ***************************************** PROCEDURE RequerySys(CurPath) LOCAL FileSkeleton, Attributes, x LOCAL ARRAY aFiles[1] IF VARTYPE(m.CurPath) = "C" AND NOT EMPTY(m.CurPath) ELSE CurPath = CURDIR() ENDIF CurPath = ADDBS(m.CurPath) aFiles = NULL FileSkeleton = "*.*" Attributes = "DHS" ADIR(aFiles, m.CurPath + m.FileSkeleton, m.Attributes) FOR x = 1 TO ALEN(aFiles,1) INSERT INTO (DBF()) (FileName, Path, Size) ; VALUES (JUSTFNAME(aFiles[m.x,1]), m.CurPath, ; aFiles[m.x,2]) IF "D" $ aFiles[m.x,5] AND NOT aFiles[m.x,1] = "." * It's a folder RequerySys(m.CurPath + aFiles[m.x,1]) ENDIF ENDFOR RETURNNotice that RequerySys() gets called recursively. Notice the LOCAL ARRAY aFiles declaration.