Applescriptの話になってきたので
「Mac OS Xのテキストエディタ総合 Part12」から移動してきました

--CotEditorでファイルを開いて文末に日時を挿入
--ファイルパスの例"/Users/ユーザー名/Desktop/ファイル名.txt"
set filePath to "ファイルパス" as POSIX file

--上記ファイルパスのファイルをCotEditorで開く
--(CotEditor.appがApplicationsフォルダの直下にある場合を想定)
tell application "Finder"
open filePath using file "CotEditor" of folder "Applications" of startup disk
end tell

tell application "CotEditor"
activate
tell front document
-- カーソルをドキュメントの末尾に移動
set docLen to length
set range of selection to {docLen, 0}
--末尾に日時を挿入
set contents of selection to return & return & return & return & "---" & (current date) & "---"
--日時挿入した行の2行上にカーソルを移動
set theRange to range of selection
scroll to caret
set item 1 of theRange to (item 1 of theRange) + 2
set item 2 of theRange to 0
set range of selection to theRange
end tell
end tell