Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Writing in the text file

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1215
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Writing in the text file
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Writing in the text file - 8/5/2004 12:15:12 PM   
  Saurabh Adhikary

 

Posts: 5
Score: 0
Joined: 8/5/2004
From: Nepal
Status: offline
i am new to Visual Basic Script.

I was trying to create a new text file(eg "test.txt" ), read from the same textfile("test.txt")and then again add some lines to the same test file("test.txt"). I succeeded in creating a new file and reading from it but could not add new lines to the same file.

Please guide me.
 
 
Post #: 1
 
 Re: Writing in the text file - 8/6/2004 12:05:16 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
What do you have so far?

Const ForAppending = 8
Set fTest = Fso.OpenTextFile("c:\testfile.txt", ForAppending)

fTest.WriteLine("Line One")
fTest.WriteLine("Line Two")

(in reply to Saurabh Adhikary)
 
 
Post #: 2
 
 Re: Writing in the text file - 8/7/2004 11:50:00 AM   
  Saurabh Adhikary

 

Posts: 5
Score: 0
Joined: 8/5/2004
From: Nepal
Status: offline
thanks for your help mbouchard.

(in reply to Saurabh Adhikary)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Writing in the text file Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts