Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting documents by date

Status
Not open for further replies.

danmoss

Programmer
Feb 14, 2001
42
GB
I have an asp page which goes through whatever the current folder is using a for..next loop. Every file it finds that is a DOC, XLS, or PDF gets displayed, the others get ignored.
Because it searches the folder as found on the server, the files get displayed alphabetically.
Is there a way of getting this to display the results without resorting to databases?
The current code goes like this:
Code:
<%
For Each objFile in objFolderContents
strTypeFiles=objFile.Type 
'Response.write &quot;strTypeFiles = &quot; &amp; strTypeFiles

	If strTypeFiles=&quot;WordPad Document&quot; Then 
%> 
<td align=left>
<a href=&quot;<%=objFile.Name %>&quot;><font face =&quot;arial&quot;><%=objFile.Name%></a></font><br>
</td>
<td align=right>
<%=objFile.DateLastModified %><BR></td></tr>
<%
 
Oops!
The question there should have read:
Is there a way of getting this to display the results in date order without resorting to databases?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top