ddir = "C:\mydbcdirectory\" && change this to the dbc directory SET SAFETY OFF CLOSE ALL =ADIR(dbfiles,ddir+"*.dbc") SELE 0 CREATE TABLE dbctables (cdbc c(25), ctable c(100), cobjname c(25), ctype c(20)) FOR i = 1 TO ALEN(dbfiles,1) IF TYPE('dbfiles(i,1)') <> "C" .or. EMPTY(dbfiles(i,1)) LOOP ENDIF IF !FILE(ddir + dbfiles(i,1)) LOOP ENDIF SELE 0 USE (ddir + dbfiles(i,1)) ALIAS dbconefile IF USED('dbconefile') WAIT WINDOW "Working On: "+ddir+dbfiles(i,1) NOWAIT SELE dbconefile =AFIELDS(amyfields) talias = ALIAS() SET FILTER TO UPPER(ALLTRIM(objecttype)) = "TABLE" GO TOP SCAN IF !DELETED() STORE RECNO() TO mrecno STORE ALLTRIM(UPPER(objectname)) TO lcobjname WAIT WINDOW "Working on: "+lcobjname NOWAIT SELE dbctables APPEND BLANK REPLACE dbctables.cDBC WITH UPPER(ALLTRIM(LEFT(dbfiles(i,1),RAT(".",dbfiles(i,1))-1))) REPLACE dbctables.cobjname WITH UPPER(ALLTRIM(lcobjname)) REPLACE dbctables.ctype WITH "TABLE" FOR it = 1 TO ALEN(amyfields,1) IF TYPE('amyfields(it,1)') = "C" APPEND BLANK REPLACE dbctables.cdbc WITH UPPER(ALLTRIM(LEFT(dbfiles(i,1),RAT(".",dbfiles(i,1))-1))) REPLACE dbctables.ctable WITH DBF() REPLACE dbctables.cobjname WITH amyfields(it,1) REPLACE dbctables.ctype WITH "FIELD" ENDIF ENDFOR SELECT dbconefile IF RECNO() <> mrecno GOTO mrecno ENDIF ENDIF ENDSCAN IF TYPE('ALEN(amyfields,1)')="N" RELEASE amyfields ENDIF SELECT dbconefile USE IN dbconefile ENDIF ENDFOR SELE dbctables browse