Dynamic Displayer of folders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bkendra5
    New Member
    • Jan 2008
    • 16

    Dynamic Displayer of folders

    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!
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    Originally posted by bkendra5
    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

    [code=asp]
    set MyFSO = server.createob ject("Scripting .FileSystemObje ct")
    MyFolder = Request.ServerV ariables("APPL_ PHYSICAL_PATH") & "..\wwwroot\Nam eOfFolder"
    set MyFiles = MyFSO.GetFolder (MyFolder)
    set FileList = MyFiles.Files
    'LOOP THROUGH
    for each PolicyFile in FileList
    response.write PolicyFile.name
    next
    [/code]

    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

    Comment

    • DrBunchman
      Recognized Expert Contributor
      • Jan 2008
      • 979

      #3
      You can also use an <embed> or <iframe> tag to display your pdf in the browser along with other content.

      Dr B

      Comment

      Working...