> HI
> in that file it usese other files to .do u have its
> confusing as i am nt very strng in cfm ,its difficult to
> work on that , will u help me to do that pls

Here you go, stick this in a filemap.cfm template and execute it as a
custom tag:

<cfparam name="attributes.scope" type="string" default="caller">
<cfparam name="attributes.return" type="string" default="filemap">
<cfparam name="attributes.directory" type="string" default="">
<cfparam name="attributes.path" type="string" default="">

<cfdirectory name="rsfiles" action="" filter="*" sort="name"
directory="#attributes.directory#">
<cfparam name="attributes.filequery" type="query"
default="#queryNew(rsfiles.columnlist & ',path')#">
<cfset filemap = attributes.filequery>

<cfloop query="rsfiles">
<cfset temp = QueryAddRow(filemap)>
<cfloop index="x" list="#rsfiles.columnlist#">
<cfset temp =
QuerySetCell(filemap,x,rsfiles[x][currentrow])></cfloop>
<cfset temp = QuerySetCell(filemap,"path",attributes.path)>
<cfif rsfiles.type is not "file" and not
listfind(".,..",rsfiles.name)>
<cfmodule template="filemap.cfm" filequery="#filemap#"
path="#request.tapi.getPath(rsfiles.name,attributes.path)#"

directory="#request.tapi.getPath(rsfiles.name,attributes.directory)#">
</cfif>
</cfloop>

<cfset setVariable("#attributes.scope#.#attributes.return#",filemap)>

I'd forgotten how much extra stuff was in that tag... and could swear
I hadn't recursed it, but I guess I was thinking of another tag,
probably the deltree tag.

Anyway -- as to the attributes, give it just a directory - you'll get
a typical cfdirectory query (in the variable "filemap" or another
variable if you provide a "return" attribute), with an extra column
called "path" which will contain a relative path from the directory
you specify to each file in that directory or any subdirectory.

hth

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to