Can anybody help me??

I've gone through all the comments received and the Online Reference, as well as the "Scripting with Kixtart" book by Bob Kelly, but am banging my head on a brick wall (literally).

I've put my latest attempt to:

- establish the date from filename1 & filename2
- report these dates to logfile1 & logfile2 respectively

sounds simple, but I've tried tweaking the code in places, but have trouble in getting it to work - made worse (for me) as it's difficult to know which part of the code has the error.

I've now upgraded to the latest version of Kixtart.

Thanks to any expert prepared to help
Code:
; Create the TIMESTAMP
; a TIMESTAMP is not strictly necessary!

IF @MONTHNO < 10 
$MONTH= "0" + "@MONTHNO"
ELSE
$MONTH= "@MONTHNO"
ENDIF

IF @MDAYNO < 10 
$DAY= "0" + "@MDAYNO"
ELSE
$DAY= "@MDAYNO"
ENDIF

$timestamp = "@YEAR" + "-" + "$MONTH" + "-" + "$DAY" + " " + @TIME
$ComputerName   = @WKSTA

; ----------------------------------------------------
;Create an entry in I:\foldername\auditfile1.txt & 
;I:\foldername\auditfile2.txt relating to 
;date held for filename1 & filename2 respectively
; ----------------------------------------------------

$logfile1 = "I:\foldername\auditfile1.txt"
$logfile2 = "I:\foldername\auditfile2.txt"

$Result1 = GetFileTime("C:\Program Files\filname1.txt", 0)
$Result2   = GetFileTime("C:\Program Files\filname2.txt", 0)

$ = Open (3, $logfile1, 4)

IF Open(3, $logfile1, 4 ) = 0
  $x = WriteLine( 3 , $Result1string + Chr(13) + Chr(10) )
ELSE
  BEEP
  ? "failed to open file, error code : [" + @ERROR + "]"
ENDIF

If Close(3)
  Beep
  ? "Error closing file!"
EndIf

$ = Open (3, $logfile2, 4)

IF Open(3, $logfile2, 4 ) = 0
  $x = WriteLine( 3 , $Result2string + Chr(13) + Chr(10) )
ELSE
  BEEP
  ? "failed to open file, error code : [" + @ERROR + "]"
ENDIF

If Close(3)
  Beep
  ? "Error closing file!"
EndIf

exit