Hi everyone,
I am setting up pa page to display a list of subfolders. Easy enough with the code (1) below. However I have a requirement to sort the folders in various ways such as DateLastModified and Folder name descending.
I have found posts on other forums giving code examples using arrays which have had limited success.
Can anyone point me at a working example? Thanks.
(1)
--------------------------------
<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test\")
for each x in fo.SubFolders
'Print the name of all subfolders in the test folder
Response.write(x.Name & "<br />")
next
set fo=nothing
set fs=nothing
%>
-----------------------------