>>SET DELETED ON >> >>txtPathName = "DADOS\ECT\" + "ECT" + CHRTRAN(DTOC(DATE()),"/","") + ".TXT" >>= MESSAGEBOX (txtPathName) >>SET SAFETY OFF >>COPY FILE (anxFullPth) TO (txtPathName) >>SELECT * FROM pgreembolso WHERE .f. INTO CURSOR pgreembolso3 READWRITE >> >>SELECT pgreembolso3 >>append FROM (txtPathName) type SDF && till here records are appended OK >>SELECT pgreembolso3 >>BROW >>GOTO 1 >>DELETE >>PACK >>GO TOP >>BROW >>>Check Moises' code, and you will see that he first DELETE ALL, then he APPENDs, then he DELETEs the first record which is already deleted...! After the first DELETE ALL he has forgotten to PACK. Nevertheless he uses a zillion lines to do something which could be done in two lines.