Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / February 2008



Tip: Looking for answers? Try searching our database.

Get directory structure on CF Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
YogeshM - 27 Feb 2008 10:11 GMT
Hi,

Is there any possibility to view the directory structure of the CF Server
using CF Tags?

E.g. When you are creating a MS Access datasource, it allows you to Browse to
the required directory on the CF Server.

Would be grateful if you could please explain to me how this can be done using
CF.

Thanks and regards,
Yogesh Mahadnac
prasanth25 - 27 Feb 2008 10:27 GMT
Hi,
   Try cfdirectory tag. That can be used to list directories. I don't think CF can be used for a graphical output of directory structure.

Prasanth
YogeshM - 27 Feb 2008 15:23 GMT
Hi Prasanth,

Indeed I had used cfdirectory tag to list the directories well before posting
this thread.

The only thing is that I can't get the cftree to display a windws-explorer
tree-like structure where I will also give the users the possibility to create
a folder etc.

Any ideas?

Thanks and regards,
Yogesh
mrgccc3 - 29 Feb 2008 00:50 GMT
Well here's one example: http://www.forta.com/blog/index.cfm?mode=entry&entry=A61BC791-3048-80A9-EF8258B9
7C3454CA


And in case you're unsure of the cftree and cftreeitem usage, you
would have to loop through all the directories and produce something
similar to this, but of course not hardcoded:

<cfset parent = expandpath("../ext2/")>
<cfdirectory directory="#parent#" action="list" name="myDir"/>
<cfdirectory directory="#expandpath("../ext2/docs/")#" action="list"
name="mydir2">
<cfdump var="#mydir#">
<cfform>
    <cfoutput>
        <cftree name = "ExtJs">
            <cfloop query="myDir">
            <cftreeitem value="#mydir.name#">
                <cfloop query="myDir2">
                <cftreeitem value="#mydir2.name#" parent="#mydir.name#">
                </cfloop>
            </cfloop>
       </cftree>
    </cfoutput>
</cfform>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.