I am using to following code to modify an existing file on
the server, but when I submit the code nothing happens on the
server and the file does not get overwritten or modified. Could
someone look at my code and see If I am missing anything?
Thanks, cfgator
CODE:
<cfif #FORM.hsmFileName# NEQ '' >
<!--- Modify Small Image files --->
<cffile
action="upload"
filefield="smImageFil"
destination="D:\www_root\qep\web\images\products\"
attributes="Normal"
nameconflict="overwrite">
<cfset oldPathAndName = #FORM.hsmFileName#>
<cfset arrPathAndName = ListToArray(oldPathAndName,
'\')>
<cfset fileName =
arrPathAndName[ArrayLen(arrPathAndName)]>
<!--- Rename the file to the product number --->
<cfset name1 = "D:\www_root\qep\web\images\products\"
& #filename#>
<cfset name2 = "D:\www_root\qep\web\images\products\"
& #form.prod_number# & "_" & "sm" & "." &
"JPG">
<cffile action="rename"
source = "#name1#"
destination = "#name2#"
attributes = "Normal">
</cfif>