I am using the following code to Upload files to the server with no problems, but when I try to use this code to modify an existing file nothing happens on the server and the file is not updated?
Thanks In Advanced
CODE:
<cfif #FORM.hsmFileName# NEQ '' >
<!--- Modify Small Image files --->
<cffile
action="upload"
filefield="smImageFil"
destination="D:\ 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:\ & #filename#>
<cfset name2 = "D:\ & #form.prod_number# & "_" & "sm" & "." & "JPG">
<cffile action="rename"
source = "#name1#"
destination = "#name2#"
attributes = "Normal">
</cfif>
Thanks In Advanced
CODE:
<cfif #FORM.hsmFileName# NEQ '' >
<!--- Modify Small Image files --->
<cffile
action="upload"
filefield="smImageFil"
destination="D:\ 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:\ & #filename#>
<cfset name2 = "D:\ & #form.prod_number# & "_" & "sm" & "." & "JPG">
<cffile action="rename"
source = "#name1#"
destination = "#name2#"
attributes = "Normal">
</cfif>