New to Kixtart so bare with me please if this is a basic problem.

Using Kixtart 4.12:
When copying a file from a server to a client where the file already exists on the client - the script terminates. I want the script to overwrite the file and am using the basic copy statement with no joy. Works fine when I try on my client but not on any of the other clients. I can't get the script to delete or move a file on a client either?

code:
$FileName='<test.doc>'
$SrcPath='\\<server>\<folder>\'
$DestPath='C:\Program Files\<folder>\'
$DestFile=$DestPath+'\'+$FileName
$SrcFile=$SrcPath+'\'+$FileName
if comparefiletimes($DestFile,$SrcFile)<0 or 1-exist($DestFile)
copy $SrcFile $DestPath
endif