SELECT * From dirlist ORDER BY Name #getimages.Name#
[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Rubex_Cube [ip] => skyjumping@hotm [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Listing contents of a directory folder to contents ofdirectory - Coldfusion - Advanced Techniques

Listing contents of a directory folder to contents ofdirectory - Coldfusion - Advanced Techniques

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 ...

  1. #1

    Default 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

  2. #2

    Default 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

  3. #3

    Default 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 her and when a
    person clicks on the selected folder / link the selection lists the contents of
    that selected folder.

    Rubex_Cube Guest

Similar Threads

  1. Folder contents upload?
    By zgeeip in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: February 13th, 07:37 PM
  2. cfdirectory - linking directory folder to contents ofdirectory.
    By Rubex_Cube in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 11th, 05:29 PM
  3. showing folder contents
    By 9thrrc_webmaster in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 11th, 12:45 AM
  4. Replies: 2
    Last Post: February 10th, 11:45 PM
  5. rsync exclude file - directory name without directory contents
    By emilio lazardo in forum Linux / Unix Administration
    Replies: 0
    Last Post: December 3rd, 10:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •