Get list of folders
 

Which Subfolders are within my main folder?
<% 
Whichfolder=server.mappath("\") &"/"

Dim fs, f, f1, fc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Whichfolder)
Set fc = f.subfolders

For Each f1 in fc
   Response.write (f1.name & "<BR>")
Next
%>


 

Which subfolders are within "cgi-bin" folder?

<% 
Whichfolder=server.mappath("\") &"/cgi-bin/" 

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Whichfolder)
Set fc = f.subfolders

For Each f1 in fc
   Response.write (f1.name & "<BR>")
Next
%>


AspTutorial.info.