This works:
<cfset tempFile = ExpandPath('A_FILE_THAT_EXISTS')>
<cfset newName = ExpandPath('.\') & "A_RENAMED_FILE">
<cfoutput>
<p>Changing:<br />#tempFile#<br />to:<br />#newName#</p>
<p>A_FILE_THAT_EXISTS: #FileExists(tempFile)#</p>
<p>A_RENAMED_FILE: #FileExists(newName)#</p>
<cffile action="rename" source="#tempfile#" destination="#newName#"
attributes="normal"/>
<p>A_FILE_THAT_EXISTS: #FileExists(tempFile)#</p>
<p>A_RENAMED_FILE: #FileExists(newName)#</p>
</cfoutput>
The error you're seeing comes about when this runs once and the
A_FILE_THAT_EXISTS file no longer exists because it's been renamed.
If you're still not getting anywhere, go back to a blank page and start
again with a simple test.
Adrian
-----Original Message-----
From: Gary Strommen [mailto:[EMAIL PROTECTED]
Sent: 05 March 2007 20:55
To: CF-Newbie
Subject: Re: cffile renaming
That didn't work either. I appreciate your help, any other ideas?
-Gary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2610
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15