deletefile is a procedure in the windows api
fileexists is a function from the sysutils unit

you need to include both in your uses clause(eg. "uses sysutils, windows;")

Regards,
Jeppe