FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para CA-Clipper AGREGAR LINEA A ARCHIVO TXT
Posts: 39
Joined: Tue Mar 26, 2013 02:09 PM
AGREGAR LINEA A ARCHIVO TXT
Posted: Wed Feb 10, 2021 04:21 AM

Estimados, necesito de vuestro conocimiento

tengo un archivo .TXT con la siguiente estructura.
2155420028207000;5542;0003;00002820;00000695;0001;00001000;PAN CORRIENTE;0;00000695;00000001;00001400;00000970;00020221;00001530;192.168.0.200
2155420028207000;5542;0003;00002820;00000695;0002;00009467;TRITON NARANJA;1;00000000;00000001;00000700;00000700;00020221;00001530;192.168.0.200

y Necesito agregar una linea al final del ultimo registro...
para que quede algo asi

2155420028207000;5542;0003;00002820;00000695;0001;00001000;PAN CORRIENTE;0;00000695;00000001;00001400;00000970;00020221;00001530;192.168.0.200
2155420028207000;5542;0003;00002820;00000695;0002;00009467;TRITON NARANJA;1;00000000;00000001;00000700;00000700;00020221;00001530;192.168.0.200
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

las XXX serán para marcar el final.

Como debo hacerlo?

Muy Agradecido desde ya!!!

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: AGREGAR LINEA A ARCHIVO TXT
Posted: Wed Feb 10, 2021 08:36 AM
Code (fw): Select all Collapse
cTxt = MEMOREAD( "yourfile.txt" )
cTxt += "XXXXXXXXXXXXXXXXXXXXX"
MEMOWRIT( "yourfile.txt", cTxt )


EMG

Continue the discussion