Did you consider deleting the file and then recreating it? But if you still wanna do it like that here is how you can. Open the file using StreamWriter and specify the
append argument as false which will clear the file.
Code:
Dim wr As New IO.StreamWriter("file path", False)
dont forget to close the stream
wr.Close()