You mean the client's directory structure by "local"? That's quite hard, you will need an ActiveX component to do that, or <input type="file">, which opens a file dialog box.
If you mean the directory on the server, that's quite easy:
Thanks a lot!
But what I am actually doing now is to develop a online virtual directory. People can upload, download... such kind of things.
I am using database to keep the info of each folder the user created. There have, say, fd_parent propertie to point to the folder's parent folder, fd_child(boolean) to tell if the folder has sub-folder.
What I am trying to do now is to list the directories out and branch them out by using <cftree> or some other tags.
Any suggestions from you are highly appreciated.
Thanks!
Albert
In the <cftreeitem> tag you can specify which record should be the parent of a certain item. If you do a clever query (my best bet is with a GROUP BY), you should be able to group all the child elements under the parent element. If you need more help, please be more specific on your database design. Good luck
The code is here:
<cfquery datasource="TPVWDDB" name="getFolder">
SELECT *
FROM folder_t
WHERE memID = '#session.memID#'
</cfquery>
<cftreeitem query="getFolder" display="fd_name" value="fd_id" parent="fd_parent" img="image/fclosed.jpg" imgopen="image/fopen.jpg">, and I didn't use <cfloop>, but it cannot work the way I want.
So far, I am still quite not sure what is the different I use <cfloop> and query property in <cftreeitem>, but anyway, it worked finally!
But here, I still got some problems, how can I pass the folder/file value to the next page if I want to do some operations on that folder/file?
Sorry, I feel quite clumsy at ColdFusion.
I could say nothing but thanks to you guys' generous help. Thank you very mush!
Albert
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.