You forgot to put the "on" after debug. Kix is looking for that value and is using the first thing available, which in this case is $home or likely your $cdate. Then you are left with "Unexpected command".

 Code:
debug on
;**** 
;**** 

;
; Docmailer.KIX
; mail reports to certain docs
;
;  Note :  Reads doctor info from docmailer.txt file
;

;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-
;setup


$home = "K:\Doctor Reports\"
;$FSO = createobject("Scripting.FileSystemObject")