Currently, I have
<cfset filedirectoryYear = "E:\FilesSubmitted\"&#form.current_year#&"\"&#form.division#&"\">
<cfif FORM.attachment_1 neq "">
<cffile action="upload"
accept="text/plain,application/msword,application/pdf,application/rtf"
filefield="attachment_1"
destination="E:\temp\uploads"
nameconflict="Makeunique"
>
<!--- rename the file and move it to permanent destination --->
<cfset submittedfileName =
#form.departmentname#&"_"&#form.departmentnumber#&"_"&#form.section_number_1#&"."&#cffile.ClientFileExt#>
<cfset presentfileName = #cffile.serverFileName#&"."&#cffile.ClientFileExt#>
<cffile
action="rename"
source="E:\temp\uploads\#presentfileName#"
destination=#filedirectoryYear##submittedfileName#
>
<!--- now create a temporary variable for the attachment so that it can be emailed later on --->
<cfset attachment_local_file_1 =
#filedirectoryYear#&#submittedfileName#&#cffile.ClientFileExt#>
</cfif>
<cfset attachment_local_file_1 = #filedirectoryYear#&#submittedfileName#>
When I submit, I get the error message
Attribute validation error for tag CFFILE.
The value of the attribute source, which is currently E:\temp\uploads\File.pdf, is invalid and this line is referred. destination="#filedirectoryYear##submittedfileName#" from the snippet
<cffile
action="rename"
source="E:\temp\uploads\#presentfileName#"
destination=#filedirectoryYear##submittedfileName#
>
The filedirectoryYear path exists. What could be the issue? I am using ColdFusion 8 on a Windows machine with IIS