> 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">

How about this?

<cfif fileexists("d:\templates\output.xls")>

    <!--- File Exists --->

            <CFFILE ACTION="Delete"FILE="d:\templates\output.xls">


<cfelse>

    <!--- File doesn't exist --->

</cfif>

Will

------------------------------------------------------------------------------------------------
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]

Reply via email to