Function GetChildDirectories( tcDirectory ) Local lnDirCnt, laDirs[1], lnCnt *** add the current directory to the list INSERT INTO MyAlias ( cDirectory ) VALUES ( tcDirectory ) *** Now see if we have any directories under the current directory lnDirCnt = Adir( laDirs, tcDirectory + '*.*', 'D' ) If lnDirCnt > 1 For lnCnt = 1 To lnDirCnt If Left( laDirs[ lnCnt, 1 ], 1 ) # '.' *** Make sure we have a directory and not a file If Directory( tcDirectory + laDirs[ lnCnt, 1 ] ) GetChildDirectories( tcDirectory + laDirs[ lnCnt, 1 ] + '\') Endif Endif Endfor Endif