MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Deleting charachter from a text file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68183] Re: Deleting charachter from a text file
  • From: "Giacomo Ciani" <giacomo.ciani at gmail.com>
  • Date: Thu, 27 Jul 2006 05:30:09 -0400 (EDT)
  • References: <200607250801.EAA28697@smc.vnet.net><ea72c5$k4b$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

If I understand correctly the function you are suggesting works with
strings, while I'm dealing with streams...

Thanks anyway

Giacomo

Adriano Pascoletti wrote:
> Giacomo,
> try StringDrop[ ..., -2]
>
> Adriano Pascoletti
>
> On 25 lug 2006, at 10:01, Giacomo Ciani wrote:
>
> > Hello,
> >
> > I'm using direct access to text files to save data my program
> > generates. So I use a syntax like:
> >
> > OpenWrite[file];
> > WriteString[file,"text"];
> > ...
> > WriteString[file,"text2"];
> > ...
> > Ecc...
> > Close[file]
> >
> > I would like to be able to remove some characters (i.e. the last two
> > characters) from the file before writing new ones (as an example, I
> > could need to remove the "xt" character of the word "text" before
> > writing the word "text2"). How can I accomplish this? I can't find any
> > function in the documentation to remove characters from a file...
> >
> > Thanks
> >
> > Giacomo
> >


  • Prev by Date: Re: Graphics export quality-methods and defaults
  • Next by Date: Re: ImplicitPlot problem
  • Previous by thread: Re: Deleting charachter from a text file
  • Next by thread: Re: Deleting charachter from a text file