PenguinHead
Programmer
I want to list within a page the folders and files that exist within a specific location. Currently I am able to list the files, but can't seem to get the folders to be listed as well. Any tips?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
Dim objFSO
Dim objFolder
Dim objSubFolder
Dim objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get Current Folder
Set objFolder = objFSO.GetFolder(Server.MapPath("."))
Response.Write "Current Folder: " & objFolder.Name & "<br/>"
For Each objSubFolder In objFolder.SubFolders
Response.Write " SubFolders: " & objSubFolder.Name & "<br/>"
Next