Online Earning Sources (Without Investment)

If you want to post, send your post on dotnetglobe@gmail.com .Put 'Title' as 'Subject'

Pages

Friday, December 28, 2012

Append Text in Text file using VB Script


Step 1:Create file in d: drive with name "test.txt"

Step 2:Create VB Script file and put below code in it

'---Code start Here---
Set data="test1"

Set oFSO =CreateObject("Scripting.FileSystemObject")

Set objFileToWrite = oFSO.OpenTextFile("d:\test.txt",8,true) '8 for Append

objFileToWrite.WriteLine(data)

objFileToWrite.Close

Set objFileToWrite = Nothing

'--End Here--


No comments:

itworld