I am using code to bulk upload images to a server. I works perfectly, but I need it to work with a 'dynamic' name for the folder with will receive the images. I would like some advice as to whether the approach is feasible - as I say it works for a given receiving directory name, but not for a dynamic directory name.
You will see in the code attached, that I have a recordset which selects one record and I am trying to use that result for the name of the receiving folder. I show in the code the two examples of where this approach is taken.
Advice needed as to whether this approach is correct or am I infringing some basic coldfusion rules. Plese remember that the overall approach does work when I hard wire in a directory name and also that the recordset and the output does work correctly in a simple test page
Thanks for some guideance
<cfquery name="Recordset1" datasource="abac">
WHERE ID = 41
useage example 1
<cfset myDir = "#expandpath(".")#\<Cfoutput>#RECORDSET1.himages#</cfoutput>\" />
usage example 2
directory="#ExpandPath( './<cfoutput>#RECORDSET1.himages#</cfoutput>/' )#"