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: [mg68143] Re: Deleting charachter from a text file
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 26 Jul 2006 02:26:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

you must open the file, read the contents in the memory
and save the changed contents.

Any editor keep the file contents in memory 
(atleast partial) and you should do this also.

Regards
  Jens

"Giacomo Ciani" <giacomo.ciani at gmail.com> schrieb 
im Newsbeitrag news:ea4jva$sck$1 at smc.vnet.net...
| 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: Error message "MakeExpression::boxfmt: InputForm in MakeExpression (...) is
  • Next by Date: Graphics export quality-methods and defaults
  • Previous by thread: Re: Deleting charachter from a text file
  • Next by thread: Re: Deleting charachter from a text file