Excellent advise -- thank you both for taking the time to respond. Best Regards, Dakota
On Wed, Sep 23, 2009 at 4:11 PM, Rick Root <rick.r...@webworksllc.com>wrote: > > If you're trying to dynamically generate code to put in a file, you > can't do it that way. > > Do this instead: > > <!--- GET LIST LENGTH ---> > <cfset printIt = "1212,1549,2003"> > <cfset listLength = ListLen("#printIt#")> > <!--- DISPLAY EVERY ELEMENT IN LIST ---> > <cfset x = 1> > <cfset out = ""> > <cfloop index="i" from="#x#" to="#listLength#" step="1"> > <cfset out = out & '<CFSET varMergeFile#i# = > "c:\inetpub\uploads\pdf\resume_#i#.pdf"'> > </cfloop> > <cfoutput>#out#</cfoutput> > > Of course you won't see the output because it won't render ... but you > can write the contents of the "out" variable to a file or put it in a > DB or whatever. > > ALTERNATIVELY, if what you're actually tring to do is set the > variables, do this: > > <!--- GET LIST LENGTH ---> > <cfset printIt = "1212,1549,2003"> > <cfset listLength = ListLen("#printIt#")> > <!--- DISPLAY EVERY ELEMENT IN LIST ---> > <cfset x = 1> > <cfset out = ""> > <cfloop index="i" from="#x#" to="#listLength#" step="1"> > <CFSET variables["varMergeFile#i#"] = > "c:\inetpub\uploads\pdf\resume_#i#.pdf"> > <!--- or, god forbit ---> > <cfset setVariable("varMergeFile#i#", > "c:\inetpub\uploads\pdf\resume_#i#.pdf")> > </cfloop> > > > -- > Rick Root > CFFM - Open Source Coldfusion File Manager > http://www.opensourcecf.com/cffm > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326565 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4