Question
CFFILE Read action
Can anyone tell me how to read a file (.txt file) using
CFFILE Read action but the file is located in a different
directory?
In my ReadFile.cfm I have:
<CFPARAM NAME="ATTRIBUTES.L_Filenames" DEFAULT="#request.ClientName#/MyFolder/CompanyName/PESFeed.txt" >
<!--- #request.ClientName# is wwwroot --->
<CFFILE ACTION = "READ" FILE = "#Filename#" VARIABLE = "fileContents">
the error I got says:
An error occurred when performing a file operation READ on file C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\wwwroot/MyFolder/CompanyName/PESFeed.txt.
The cause of this exception was: java.io.FileNotFoundException: C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\wwwroot\SAN\WellsFargoWFI\PESFeed.txt (The system cannot find the path specified).
How can I point CFFILE to read PesFeed.txt that is located in a different directory than where ReadFile.cfm is?
In my ReadFile.cfm I have:
<CFPARAM NAME="ATTRIBUTES.L_Filenames" DEFAULT="#request.ClientName#/MyFolder/CompanyName/PESFeed.txt" >
<!--- #request.ClientName# is wwwroot --->
<CFFILE ACTION = "READ" FILE = "#Filename#" VARIABLE = "fileContents">
the error I got says:
An error occurred when performing a file operation READ on file C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\wwwroot/MyFolder/CompanyName/PESFeed.txt.
The cause of this exception was: java.io.FileNotFoundException: C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\wwwroot\SAN\WellsFargoWFI\PESFeed.txt (The system cannot find the path specified).
How can I point CFFILE to read PesFeed.txt that is located in a different directory than where ReadFile.cfm is?