You can get a script to execute when you login by dropping it into your login items. (accounts pref. pane.)
As far as I know you cannot stop a file from being deleted, unless you are talking about another user on your system deleting it. (Then you could do something with permissions.)