Code:
If Not @LogonMode
  Break On
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')


Dim $Folder
$Folder='C:\logfile\'
;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