By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

How add a line of text to a textfile?

P: n/a
How add a line of text to a textfile?

I need a way to open an existing file of type .txt insert a line of tekst
and then close the file again.

TIRislaa

Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Cor
Hi Tor,

Have a look at this

http://msdn.microsoft.com/library/de...dtexttopic.asp
I hope this helps?

Cor
How add a line of text to a textfile?

I need a way to open an existing file of type .txt insert a line of tekst
and then close the file again.

TIRislaa

Nov 20 '05 #2

P: n/a
Hi,

Try:-

FileOpen(1, "myfile.txt",OpenMode.Append)
Write(1, "My Line of Text")
FileClose(1)

Merlin

"Tor Inge Rislaa" <to*************@rislaa.no> wrote in message
news:t9*****************@news2.e.nsc.no...
How add a line of text to a textfile?

I need a way to open an existing file of type .txt insert a line of tekst
and then close the file again.

TIRislaa

Nov 20 '05 #3

P: n/a
"Tor Inge Rislaa" <to*************@rislaa.no> schrieb
How add a line of text to a textfile?

I need a way to open an existing file of type .txt insert a line of
tekst and then close the file again.


Pass System.IO.FileMode.Append when opening the filestream.

Pass Microsoft.VisualBasic.OpenMode.Append when using the fileopen sub.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

P: n/a
HAve a look at the
System.io namespace
in particular
System.io.fileinfo class

-CJ
"Tor Inge Rislaa" <to*************@rislaa.no> wrote in message
news:t9*****************@news2.e.nsc.no...
How add a line of text to a textfile?

I need a way to open an existing file of type .txt insert a line of tekst
and then close the file again.

TIRislaa

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.