Ask a Question related to Macromedia ColdFusion, Design and Development.
-
kdgayle #1
Directory listing stored in database
I have an archive section of a web site that contains a bunch of text, word and
PDF documents that users add and delete. I want a method to have CF scan the
directory, store the list of file names and links and display them on a dynamic
page.
Does anyone have a script to do such a thing? much thanks in advance!
kdg
kdgayle Guest
-
Directory Listing Denied
when I configure the sample of the .net framework, the browser list this message .,? Directory Listing Denied This Virtual Directory does not... -
listing a Directory files
hello community i want to make a directory list i have pdf documents in a list 101_4326.pdf 101_4325.pdf 201_4324.pdf 201_4328.pdf but i only... -
Directory listing
Hi php-general, I'm reading through the filesystem function of php and I can't find any function which will list me all the files which are in a... -
[PHP] directory listing
Wrong place, look at directory functions ;) Matthias Wulkow wrote: -
CD Directory Listing
Is it possible to get the Directory listing from a CD in order to write it to a searchable database? If so does anyone know where I can get this... -
jdeline #2
Re: Directory listing stored in database
See <CFDIRECTORY> at [url]http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/Tags14.htm#1097918[/url]
jdeline Guest
-
kdgayle #3
Re: Directory listing stored in database
Thanks, now all I need to do is dump this cfdirectory query into a database, ideas? (of course you can tell that I am extremely new at this, I appreciate all the help!)
kdg
kdgayle Guest
-
philh #4
Re: Directory listing stored in database
If your users add and delete items through the file system, your database info
will get out of sync in a hurry. Why not just display the results of the
CFDIRECTORY query?
Try this script. Replace the maindir value with your top archive directory.
<cfset maindir="\\server\sharename">
<CFDIRECTORY ACTION="LIST"
DIRECTORY="#maindir#"
NAME="ProjectDir"
SORT="type,name">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<table style="font-family:Verdana;font-size:8pt;">
<cfoutput query="ProjectDir">
<cfif left(name,1) NEQ ".">
<tr>
<td><a href="file:///#maindir#\#Name##iif(type is
"dir",de("\"),de(""))#">#name#</a></td><td>#iif(type NEQ
"dir",de(Size),de("(Directory)"))#</td><td>#DateLastModified#</td>
</tr>
</cfif>
</cfoutput>
</table>
</body>
</html>
philh Guest
-
kdgayle #5
Re: Directory listing stored in database
Phil, thanks... My thought was to have a script run when a user clicked, dump
the most current directory read into the database, then redirect to a CFM page
to display the recordset by whatever criteria the user wanted (title, type,
etc). And the file path would then be relative rather than absolute. But, alas,
in my febble mind this should work, but in reality, I leave to you good
folks... but I have learned something today and I thank you for that...
kdg
kdgayle Guest



Reply With Quote

