SET DELETED ONor
FOR NOT DELETED()
CLOSE DATABASES ALL SET SAFETY OFF SET DELETED ON &&& here CREATE TABLE Test (firstfld I, SecondFld C(20)) INSERT INTO Test VALUES(10,[Ten]) INSERT INTO Test VALUES( 2,[Two]) INSERT INTO Test VALUES( 1,[One]) INSERT INTO Test VALUES( 9,[Nine]) LOCATE FOR firstfld = 1 IF NOT EOF() DELETE ENDIF lcxls = PUTFILE([],[example_xls],[xls]) IF NOT EMPTY(m.lcxls) COPY TO (lcxls) XLS *** COPY TO (lcxls) FOR NOT DELETED() XLS &&& or here ELSE MESSAGEBOX([XLS - No path]) ENDIF lctxt = PUTFILE([],[example_txt],[txt]) IF NOT EMPTY(m.lctxt) COPY TO (lctxt) SDF *** or ***COPY TO (lctxt) DELIMITED ELSE MESSAGEBOX([TXT - No path]) ENDIF