I have 2 sections to the application an admin and a live section. I am allowing a user to upload a file in the admin tool that has to be placed in the live section. I tried to use the relative path but it is ignoring the destination tag?
<CFSET thisPath= ExpandPath("*.*"
>
<CFSET imgDirectory= GetDirectoryFromPath(thisPath)>
<CFIF IsDefined("FORM.list"
AND list NEQ "">
<CFTRY>
<!--- Upoad File --->
<CFFILE ACTION="UPLOAD"
FILEFIELD="FORM.list"
DESTINATION="#imgDirectory#"
NAMECONFLICT="Overwrite">
<!--- Rename Img --->
<CFFILE ACTION="RENAME"
SOURCE="#CFFILE.ServerDirectory#\#CFFILE.ServerFile#"
DESTINATION="..\..\live\one\two\list.#CFFILE.ServerFileExt#">
<!--- Catch error, if it's not a txt file --->
<CFCATCH TYPE="Any">
I'm sorry, you must upload the list array file.
</CFCATCH>
</CFTRY>
</CFIF>
<CFSET thisPath= ExpandPath("*.*"
<CFSET imgDirectory= GetDirectoryFromPath(thisPath)>
<CFIF IsDefined("FORM.list"
<CFTRY>
<!--- Upoad File --->
<CFFILE ACTION="UPLOAD"
FILEFIELD="FORM.list"
DESTINATION="#imgDirectory#"
NAMECONFLICT="Overwrite">
<!--- Rename Img --->
<CFFILE ACTION="RENAME"
SOURCE="#CFFILE.ServerDirectory#\#CFFILE.ServerFile#"
DESTINATION="..\..\live\one\two\list.#CFFILE.ServerFileExt#">
<!--- Catch error, if it's not a txt file --->
<CFCATCH TYPE="Any">
I'm sorry, you must upload the list array file.
</CFCATCH>
</CFTRY>
</CFIF>