| Subject: | Re: Listing Files and Directories |
|---|---|
| From: | Ian Skinner <iskinner@xxxxxxxxxxx> |
| Date: | Wed, 30 Jul 2008 13:14:11 -0700 |
| Newsgroups: | macromedia.coldfusion.cfml_general_discussion |
<cfparam name="url.dir" default="#rereplace(getDirectoryFromPath(getCurrentTemplatePath()),'\\$','','ONE')#"> <cfdirectory action="list" name="allDir" directory="#url.dir#" recurse="no" sort="ASC">
<cfoutput>#url.dir#</cfoutput>
<ul>
<cfoutput query="allDir">
<cfswitch expression="#allDir.type#">
<cfcase value="FILE">
<li>FILE: #allDir.name#</li>
</cfcase>
<cfcase value="DIR">
<li>DIR: #url.dir#\#allDir.name# <a
href="directoryFun.cfm?dir=#url.dir#\#allDir.name#">View</a></li>
</cfcase>
</cfswitch>
</cfoutput>
A simple directory display creating links to sub-directories.
A leave it to you to flesh out with your desire user interface and back
links to parent directories.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: IF CHECK BOX IS CHECKED, CF_output |
|---|---|
| Next by Date: | Re: Looping with cfif, dwmart |
| Previous by Thread: | Re: Listing Files and Directories, Vidikron |
| Indexes: | [Date] [Thread] [Top] [All Lists] |