I have this code
On Error Resume Next
Const ForAppending = 8
Set fso = CreateObject("Scripting.FileSystemObject")
set tf = fso.OpenTextFile("C:\TAS\file.dat", ForAppending, True)
On Error GOTO 0
and i need to verify before writing the text if the file "file.dat " exist or not in my folder ,
if it exist i need to delete it then create and write on my file
i know that i need to add DeleteFile but i don't know how ..
someone can help me please ?