What is wrong with below code. cAppend does not write anything.
DateFormat("dd-mm-yyyy")
sData=Date(Now) & Chr(9) & sData
DateFormat ("ddmmyy")
sFile=Date(Now) & ".txt"
If FileExist (AppPath & "\logs\" & sFile) = True Then
FileOpen (c1,sFile,cWrite,cAppend)
FileWrite (c1,sData)
Else
FileOpen (c1,AppPath & "\logs\" & sFile,cWrite)
FileWrite (c1,sData)
End If
'close the file
FileClose (c1)
DateFormat("dd-mm-yyyy")
sData=Date(Now) & Chr(9) & sData
DateFormat ("ddmmyy")
sFile=Date(Now) & ".txt"
If FileExist (AppPath & "\logs\" & sFile) = True Then
FileOpen (c1,sFile,cWrite,cAppend)
FileWrite (c1,sData)
Else
FileOpen (c1,AppPath & "\logs\" & sFile,cWrite)
FileWrite (c1,sData)
End If
'close the file
FileClose (c1)