CFFILE move & overwrite

237 views
Skip to first unread message

Jeff Shood

unread,
Mar 4, 2011, 6:56:10 PM3/4/11
to Railo
It appears that when using CFFile to move a file, if the file already
exists in the destination an error is raised. I believe the default
ACF behavior is to overwrite the existing file.

Is this an on purpose difference in railo and is there a way to force
overwrite?

I'll do a simple fileExists() for now, but it would be nice to add to
our railo vs ACF documentation.

Thanks!
Jeff

Michael Offner

unread,
Mar 5, 2011, 4:14:51 AM3/5/11
to ra...@googlegroups.com
Railo and ACF has the same behavior here.
In addition Railo support the attribute nameconflict also in this case.

/micha

Von meinem iPhone gesendet

AJ Mercer

unread,
Apr 4, 2011, 4:42:59 AM4/4/11
to ra...@googlegroups.com
I have just noticed the same thing with Railo 3.3.0.010 and ACF8

<cffile  action="move" source="#loc.args.source#" destination="#loc.args.destination#" nameconflict="overwrite">
throws and error in Railo but works in ACF8

works if this is put before it
<cfif FileExists(loc.args.destination)>
<cffile action="delete" file="#loc.args.destination#">
</cfif>


Should I raise a bug?

Michael Offner

unread,
Apr 4, 2011, 5:14:46 AM4/4/11
to ra...@googlegroups.com
yes please

/micha

2011/4/4 AJ Mercer <ajme...@gmail.com>

AJ Mercer

unread,
Apr 4, 2011, 5:32:02 AM4/4/11
to ra...@googlegroups.com
there is alread a report so I added a comment
Reply all
Reply to author
Forward
0 new messages