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--


ITWORLD
If you have any question then you put your question as comments.

Put your suggestions as comments