asked on
=========================================
THE RECORDSET
<cfquery name="Recordset1" datasource="abac">
SELECT *
FROM pagedata
WHERE ID = 41
</cfquery>
====================================================
================================================
useage example 1
<cfset myDir = "#expandpath(".")#\<Cfoutput>#RECORDSET1.himages#</cfoutput>\" />
====================================================
usage example 2
<cfdirectory
action="list"
directory="#ExpandPath( './<cfoutput>#RECORDSET1.himages#</cfoutput>/' )#"
recurse="true"
name="mylist"
/>
ASKER
RENAMING.CFM page
---------------------------------------------------------------
<cfquery name="Recordset1" datasource="abac">
SELECT *
FROM pagedata
WHERE ID = 41
</cfquery>
++++++++++++++++++++++++++++++++++++++++
<cfdirectory
action="list"
directory="#expandpath(".")&"\"&RECORDSET1.himages#"
recurse="true"
name="mylist"
>
+++++++++++++++++++++++++++++++++++++++++++++++
This is for renaming the image files to a standard photo1.jpg, photo2.jpg etc...
<cfset imageNumber = 1>
Your files have be uploaded succesfully
<cfloop query="mylist">
<cfif mylist.type eq "file">
<cffile
action="move"
source="#mylist.directory#\#mylist.name#"
destination="#mylist.directory#\photo#imageNumber#.#listlast(mylist.name,'.')#">
<cfset imageNumber = imageNumber + 1>
</cfif>
</cfloop>
--------------------------------------------------------
page folderuploader_hdlr
---------------------------------------------------------
<cfquery name="Recordset1" datasource="abac">
SELECT *
FROM pagedata
WHERE ID = 41
</cfquery>
<cfset myDir=expandpath(".")&"\"&RECORDSET1.himages />
==============================================================
<cfset variables.destination=expandpath(".")&"\"&RECORDSET1.himages />
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.
TRUSTED BY
There is no reason you can't use dynamic directory paths. Though you do not need any of those cfoutput tags. Nesting also decreases readability IMO. ie Instead use
<cfset myDir = expandpath(".") &"\"& RECORDSET1.himages />
So when you say it doesn't work, what happens .. an error? The first thing to check is the the resulting values. Do they create a valid path?
#expandpath(".")#
#RECORDSET1.himages#
#myDir#