AGREGAR LINEA A ARCHIVO TXT

AGREGAR LINEA A ARCHIVO TXT

Postby ozono1981 » Wed Feb 10, 2021 4: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!!!
ozono1981
 
Posts: 39
Joined: Tue Mar 26, 2013 2:09 pm

Re: AGREGAR LINEA A ARCHIVO TXT

Postby Enrico Maria Giordano » Wed Feb 10, 2021 8:36 am

Code: Select all  Expand view
cTxt = MEMOREAD( "yourfile.txt" )
cTxt += "XXXXXXXXXXXXXXXXXXXXX"
MEMOWRIT( "yourfile.txt", cTxt )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin para CA-Clipper

Who is online

Users browsing this forum: No registered users and 20 guests