use the CF function: FileExists()
<CFIF FileExists("d:\templates\output.xls")>
<CFFILE ACTION="Delete" FILE="d:\templates\output.xls">
</CFIF>
Bert
> -----Original Message-----
> From: Jim Watkins [mailto:[EMAIL PROTECTED]]
> Sent: 06 November 2000 14:39
> To: CF-Talk
> Subject: Checking and deleting files
>
>
> Can someone help me on checking for and then deleting a file?
> I need to check to see if the file 'output.xls' exists and
> then if it does
> delete it. Currently I use following but seems to be rather crude:
>
> <CFFILE ACTION="Write" FILE="d:\templates\output.xls"
> Output="Contents">
> <CFFILE ACTION="Delete"FILE="d:\templates\output.xls">
>
>
> Jim Watkins
> http://www.ngtcollege.org
>
> --------------------------------------------------------------
> ----------------------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists or send
> a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]