DeleteFile VBA Attachmate Reflections

I am trying to delete the first line of text file using Attachmate Reflections 2011 VBA script. But the code does not work. How can I use "DeleteLines 1, 1"? any help would be appreciated.

Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:Batch_Manipulator_File.txt", ForWriting, TristateFalse)

f.Write "Hello world!"
f.DeleteLines 1, 1

fs.CopyFile "C:Temp.txt", True
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!