'Check if file exsits'
smb1.Initialize("smb1")
smb1.SetCredentials("xx","xx","xx.local")
smb1.ListFiles("smb://xxx.xxx.x.xx/C/Test/Logfile/","Log.dat")
Wait For SMB1_ListCompleted (Url As String, Success As Boolean, Entries() As SMBFile)
If Not(Success) Then
'write compleet file' and copy to directory
Else
'edit file on server'
'This giving me error to much characters'
TextWriter1.Initialize(File.OpenOutput("smb://xxx.xxx.x.xx/C/Test/Logfile/","Log.dat",True)
End if