> I am uploading a file using CFFILE that can then be immediately viewed on
a
> web page.  The steps I am taking are:
<snip>
> At step 4, I sometimes get this error:
>
> Unable to move file 'C:\web\server\path\images\temp\abcdefg.jpg' to path
> 'C:\web\server\path\images\picture.jpg'. Access is denied. (error 5)
>
> The error is intermittent. Anyone know why this would happen?  I know it's
> not complaining about overwriting the old file, since it has already been
> deleted but this point .. I'm lost.

Like Howie said this is due to file caching in IIS.  The only way to turn
off this "feature" is to pretty much disable all file caching, which can
kill the performance of the web server.

Further complicating this issue is the fact that once you delete the
original file with CFFILE subsequent tests using FileExists() will return
false, but any attempt to overwrite that file (through renaming or
uploading) while it remains in the IIS cache will result in an error.  This
means that, short of wrapping the code in a CFTRY/CFCATCH block there is no
way to test for this condition.  At least, this is the way things have
worked out in my experience.

Regards,
Seth Petry-Johnson
Argo Enterprise and Associates

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to