Demonstration script that deletes all the contents of a text file.

Visual Basic
Edit|Remove
Const FOR_WRITING = 2
strFileName = "C:\scripts\test.txt"

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objTS = objFS.OpenTextFile(strFileName, FOR_WRITING)