Hi Rich,
Windows NT Error 5 means that access to the file is denied because some
other process is using it. My guess in your case is that your process that
serves up the CFCONTENT is the one that has the file open, therefore your
line of code which attempts to delete it can't because it is open. When you
use CFFILE to delete the file it probably isn't in use (open). Does this
make sense based on your code?
Does anyone know how to capture these types of errors from NT when working
with files? I have a similar problem when a user views a file on the server
and then uploads a newer version with the same name (this is a requirement).
Sometimes NT doesn't release the first version fast enough and Error 5 is
thrown when the my code attempts to overwrite it with the newer version.
Any ideas?
Mike Cady
----- Original Message -----
From: "Rich Wild" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 4:59 AM
Subject: CF5, cffile and cfcontent and deleting
> Got a bit of a query with CF5:
>
> If I try to serve a separate text file from a template via <cfcontent> and
> specify that the file must be deleted - an error is thrown:
>
> "Error occurred while attempting to delete the file
> D:\development\text_server\this.txt
>
> Windows NT error number 5 occurred."
>
> However, I *can* delete the file using cffile....
>
> Can anyone reproduce/confirm/explain this?
>
> -------------------------------------------------------
> Rich Wild
> Senior Web Designer
>
> -------------------------------------------------------
> e-mango.com ltd Tel: 01202 587 400
> Lansdowne Place Fax: 01202 587 401
> 17 Holdenhurst Road
> Bournemouth Mailto:[EMAIL PROTECTED]
> BH8 8EW, UK http://www.e-mango.com
> -------------------------------------------------------
> This message may contain information which is legally
> privileged and/or confidential. If you are not the
> intended recipient, you are hereby notified that any
> unauthorised disclosure, copying, distribution or use
> of this information is strictly prohibited. Such
> notification notwithstanding, any comments, opinions,
> information or conclusions expressed in this message
> are those of the originator, not of e-mango.com ltd,
> unless otherwise explicitly and independently indicated
> by an authorised representative of e-mango.com ltd.
> -------------------------------------------------------
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists