What is the best way to write to a file but also if the file doesn't exist create it.
At the moment I have
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.CreateTextFile ("\\myserver\users\intranets\myintranet\assets2\wslist.txt", ForWriting)
This works the first time I run the script but after that I get an error:
Microsoft VBScript runtime error '800a003a'
Thanks very much
Ed
File already exists
At the moment I have
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.CreateTextFile ("\\myserver\users\intranets\myintranet\assets2\wslist.txt", ForWriting)
This works the first time I run the script but after that I get an error:
Microsoft VBScript runtime error '800a003a'
Thanks very much
Ed
File already exists