Create cursor crsINDEXES ; (TAG_NAME c(10) nocptrans, ; KEY_EXPR M, ; NDXTYPE c(1), ; IS_DESC L, ; FILTEREXPR M nocptrans, ; _TABLENAME M nocptrans) Select 0 lnTables = adir(arrTables,tcDataDir+'*.dbf') For ix=1 to lnTables Use (tcDataDir+arrTables[ix,1]) If empty(cursorgetprop('Database')) If tagcount()>0 Dimension arrIndexes[tagcount(),6] For jx=1 to tagcount() arrIndexes[jx,1] = tag(jx) arrIndexes[jx,2] = key(jx) arrIndexes[jx,3] = iif(Primary(jx),'P',iif(Candidate(jx),'C',iif(unique(jx),'U','R'))) arrIndexes[jx,4] = descending(jx) arrIndexes[jx,5] = sys(2021,jx) arrIndexes[jx,6] = arrTables[ix,1] Endfor Insert into crsINDEXES from array arrIndexes Endif Endif Use EndforFor DBC, you could either use similar or scan DBC for objtype = 'Index'. Its parentid points to table record. However you could easily invalidate database while deleting the tag and recreating it.