I have a folder called "Policies" this folder contains several subfolders, inside the subfolders are the policies in PDF format. I am trying to build a single "Policies" page to display all the folders then you can click on the folder and it will then again write all the policies in that folder.
Thanks in advance! I've been working on this for about 2 months now!
Are you using Classic ASP or ASP.NET?
Here is how to use the file system object in classic ASP
-
set MyFSO = server.createobject("Scripting.FileSystemObject")
-
MyFolder = Request.ServerVariables("APPL_PHYSICAL_PATH") & "..\wwwroot\NameOfFolder"
-
set MyFiles = MyFSO.GetFolder(MyFolder)
-
set FileList = MyFiles.Files
-
'LOOP THROUGH
-
for each PolicyFile in FileList
-
response.write PolicyFile.name
-
next
-
Obviously you can add dynamic <a href> tag around your file name to link to it.
If you are using asp.net please specify as the process is quite different