Break On
Dim $SO,$Pause
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','On')
Dim $Folder, $BackupLog
$Folder='C:\UTILS\'
;Check if the folder exists, if not create it otherwise continue on.
If GetFileAttr($Folder) & 16
;Folder found do nothing
Else
MD $Folder
If @ERROR
Quit @ERROR
EndIf
EndIf
$BackupLog = CreateBackupFileLog('C:\UTILS\PSTBACKUPS.TXT','hello')
If @ERROR
'Error creating file: ' + @ERROR + ' - ' + @SERROR ?
EndIf
Function CreateBackupFileLog($PathAndFile,$Data)
Dim $Handle,$OpenFile,$WL,$CloseFile
If Not Exist($PathAndFile)
$Handle = FreeFileHandle()
If $Handle > 0
$OpenFile = Open($Handle,$PathAndFile,5)
$WL = WriteLine($Handle, $Data)
$CloseFile = Close($Handle)
EndIf
EndIf
EndFunction