Hi my script automatically generates and export a .txt and its working fine but the problem is that i will like to move exported file to another folder.. here is my code below
<cfsetting enablecfoutputonly="yes"> <!--- Required for CSV export to function properly --->
<cfcontent type="text/plain">
<cfheader name="Content-Disposition" value="attachment;filename=filename.txt">
<!--- Output Column Headers --->
<!--- Spill out data from a query --->
<CFOUTPUT query="#QueryName#" maxrows="15" startrow="#Row#"><CFLOOP From="1" To="#ListLen(ListFields)#" Index="FieldIndex"><CFIF IsDefined("ListFieldSums") AND ListFieldSums IS NOT "" AND ListGetAt(ListFieldSums, FieldIndex) IS NOT "x"><CFSET "sum#FieldIndex#" = evaluate("sum#FieldIndex#") + evaluate(ListGetAt(ListFields,FieldIndex))></CFIF><CFIF IsDefined("ListFieldFunctions")AND ListGetAt(ListFieldFunctions,FieldIndex) IS NOT "x"><CFSET FunctionCall ="#ListGetAt(ListFieldFunctions,FieldIndex)#(#chr(34)##evaluate(ListGetAt(ListFields,FieldIndex))##chr(34)#)">#evaluate(FunctionCall)#<CFELSE>#evaluate(ListGetAt(ListFields,FieldIndex))#</CFIF>|</CFLOOP>#chr(13)##chr(10)#</CFOUTPUT>
<cffile action="move"
source="attachment;filename=filename.txt"
destination="#expandpath('test/')#">
thanks in advanced
<cfsetting enablecfoutputonly="yes"> <!--- Required for CSV export to function properly --->
<cfcontent type="text/plain">
<cfheader name="Content-Disposition" value="attachment;filename=filename.txt">
<!--- Output Column Headers --->
<!--- Spill out data from a query --->
<CFOUTPUT query="#QueryName#" maxrows="15" startrow="#Row#"><CFLOOP From="1" To="#ListLen(ListFields)#" Index="FieldIndex"><CFIF IsDefined("ListFieldSums") AND ListFieldSums IS NOT "" AND ListGetAt(ListFieldSums, FieldIndex) IS NOT "x"><CFSET "sum#FieldIndex#" = evaluate("sum#FieldIndex#") + evaluate(ListGetAt(ListFields,FieldIndex))></CFIF><CFIF IsDefined("ListFieldFunctions")AND ListGetAt(ListFieldFunctions,FieldIndex) IS NOT "x"><CFSET FunctionCall ="#ListGetAt(ListFieldFunctions,FieldIndex)#(#chr(34)##evaluate(ListGetAt(ListFields,FieldIndex))##chr(34)#)">#evaluate(FunctionCall)#<CFELSE>#evaluate(ListGetAt(ListFields,FieldIndex))#</CFIF>|</CFLOOP>#chr(13)##chr(10)#</CFOUTPUT>
<cffile action="move"
source="attachment;filename=filename.txt"
destination="#expandpath('test/')#">
thanks in advanced