>There are five Tables in a directory entitled "TEMP"
>Two tables have data and the rest three are empty.
>
>I want to delete empty tables programatically.
>How is it possible?Perhaps something like this (assuming that TEMP is a subfolder of the current directory):
ADIR(aFileList, "TEMP\*.DBF")
FOR i = 1 TO ALEN(aFileList, 1)
cTable = aFileList[i, 1]
USE (cTable) IN 0
iRecords = RECCOUNT(cTable)
USE IN (cTable)
IF (iRecords = 0)
DELETE FILE ("TEMP\" + cTable)
ENDIF
ENDFOR
Laterness,
Jon
Jon Rosenbaum
Devcon Drummer