Question
CFFILE questions
I'm working with a file feed and my cffile is reading the
file everyday.
I need to add codes to make sure a new file is in that directory and there is a file in the directory (to avoid reading no file and causing error) before my CFFILE read the file.
I'm not sure how can I do this and what to add, I'm new at CF.
I have this code:
<CFLOOP LIST="#mailList#" INDEX="i" >
<!--- Read the file --->
<CFFILE ACTION = "READ" FILE = "#MailFileName#" VARIABLE = "fileContents">
<!--- Call the function in the script above to create array --->
<CFSET parseFileContents( fileContents ) >
</CFLOOP>
I need to add codes to make sure a new file is in that directory and there is a file in the directory (to avoid reading no file and causing error) before my CFFILE read the file.
I'm not sure how can I do this and what to add, I'm new at CF.
I have this code:
<CFLOOP LIST="#mailList#" INDEX="i" >
<!--- Read the file --->
<CFFILE ACTION = "READ" FILE = "#MailFileName#" VARIABLE = "fileContents">
<!--- Call the function in the script above to create array --->
<CFSET parseFileContents( fileContents ) >
</CFLOOP>
