Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Rubex_Cube #1
Listing contents of a directory folder to contents ofdirectory
cfdirectory listing... Here is my problem... I am listing directorys and when
each directory is listed I want to list the contents of that directory. If you
visit my site. [url]www.timothyrubel.com[/url] you will see that I am able to create a
list of directorys and to list the contents of each directory individually but
how can I do this so that the contents of each folder is generated when that
folder is selected? -Tim
<cfset thisPath = ExpandPath("upload/")>
<cfset thisFolder = GetDirectoryFromPath(thisPath)>
<cfset site = ("http://timothyrubel.com/upload/")>
<cfdirectory directory="#thisFolder#" name="test" action="list" sort="name
ASC, size DESC">
<cfquery dbtype="query" name="dirsOnly">
SELECT * FROM test WHERE TYPE='Dir'</cfquery>
<cfoutput> <cfloop query="dirsOnly"> <a href="#site##dirsOnly.name#"
class="style1">#dirsOnly.Name#</a><br>
</cfloop>
</cfoutput>
<cfset thisPhoto = ExpandPath("Images/intranet/")>
<cfset photo = GetDirectoryFromPath(thisPhoto)>
<cfset root = ("http://timothyrubel.com/Images/intranet/")>
<!--- <cfset photo = ("C:\Inetpub\wwwroot\timothyrubel\www\Images\intra net")>
--->
<cfdirectory directory="#photo#" name="dirlist" action="list"
sort="datelastmodified desc">
<cfquery dbtype="query" name="getimages">
SELECT * From dirlist
ORDER BY Name
</cfquery>
<html>
<cfoutput>
<cfloop query="getimages"> <a href="#root##getimages.Name#"
class="style1"><img src="#root##getimages.Name#">#getimages.Name#</a> <br>
</cfloop>
</cfoutput>
Rubex_Cube Guest
-
Folder contents upload?
We replace our photo albums weekly on the company website. We have not figured out how to upload a folder's contents with Contribute - uploading all... -
cfdirectory - linking directory folder to contents ofdirectory.
cfdirectory listing... Here is my problem... I am listing directorys and when each directory is listed I want to list the contents of that... -
showing folder contents
looking for a way to show a folders contents in a CFM page. Saying a user puts a document in a folder and some CF page automatically lists on the... -
Can This be done? Dynamic jump menus listing folder contents!
Hello all, We have: MS Advanced server2000 ASP MS SQL latest stable: PHP Active Perl -
rsync exclude file - directory name without directory contents
When using rsync to maintain incremental backups significant space can be saved on the backup server by excluding directories that have non-critical... -
JonathanBigelow #2
Re: Listing a directory folder and linking to thecontents of that directory
Not sure I understand your question. Are you saying that you want the contents
of the folders to appear when you're clicking the links generated with this
code: <cfoutput> <cfloop query='dirsOnly'> <a href='#site##dirsOnly.name#'
class='style1'>#dirsOnly.Name#</a><br> </cfloop> </cfoutput> If so, you web
server needs to be confitured to allow directory browsing or you need to create
another page that receives a directory name as an example, does a <cffile
action='read' directory='#url.directory#'> on that directory, and then loops
over the results.
JonathanBigelow Guest
-
Rubex_Cube #3
Re: Listing a directory folder and linking to thecontents of that directory
No, I can generate the list... in fact I am generating a list of only
directorys.... from the root directory... as in my example at timothyrubel.com
you will see upload 1, upload 2, upload 3, upload 4... those are folders and
inside those folders there are files. I want to go a step farther and when a
person clicks on the selected folder / link the selection lists the contents of
that selected folder.
Rubex_Cube Guest



Reply With Quote

