Re: replace string by Mythran
Mythran
Tue Nov 29 16:00:52 CST 2005
"setner" <yusretNOsPaMMINGGG@fastwebnet.it> wrote in message
news:Qo1jf.25979$tc5.14759@tornado.fastwebnet.it...
>
> "Mythran" <kip_potter@hotmail.comREMOVETRAIL> ha scritto nel messaggio
> news:Oq%23g%23OR9FHA.808@TK2MSFTNGP09.phx.gbl...
>>
>
>> Well, read in line-by-line from the file into a line buffer (single
>> string variable). Remove the last character (if you read line by line,
>> the Cr/Lf char(s) should not be on the end of the line). Store into a
>> temp string variable that contains all other lines appended to each other
>> or write to a temporary file. When all is done, re-write the original
>> file with the results ;)
>>
>> Mythran
>>
>
> uhmm i'm missing something?? see in this way...
>
> have this format:
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g/n
>
> want this format:
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g/n
> a,b,c,d,e,f,g
>
> if i read line by line i will find the /n caracther also al last line.
> maybe i'm wrong?(there's a special command to read line by line?? )
>
Oops, you said file, not line ;) Read in the file, use the Left function
passing in Len(contentsoffile) - 1 as the count argument of Left...then
write out the contents ;) That's a fast way for not-too-big files...
Mythran