Posts: 440
Location: world traveller based in UK
|
I want to quickly get a list of subfolders in a folder & also then the files in each folder.
I can get my list easy enough using a very basic script
Code:
<%
folder = "C:\"
set fso = CreateObject("Scripting.fileSystemObject")
set fold = fso.getFolder(folder)
for each file in fold.files
response.write file.name & "<br>"
next
set fold = nothing: set fso = nothing
%>
How do I sort my files ???
Is there any easy way or do I need to put the results into a recordset. I have found some examples but some look really code intensive for something that should be I feel relatively simple.
Oh p.s if I want to count the files in the subfolder is there an easy way of doing that ???
|