Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Listing all files from a directory in an html table

    I have a form that request the user to enter a path and then I'd like to have the output show up in an html table that is able to hyperlink all .asp and .txt files. What I have now is GetDirectory.html(form) then I have showDirectory.asp which currently has cookies stuff etc..but I can't seem to figure out how to get the directory that was entered from the form and display all of them in a table. All the examples i've seen use a specific file to test so I'm not grasping to whole concept. Can someone direct me to a better examples or submit some script that would help me do this task?

    I have read teh sticky up top and I currently have that script in my asp page but I can't get it from the html form.
    Thanks in advance!

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    the reason most people hard code the directory is so that the user cannot browse drives and directories on the server that they don't want them to see. You can get the drive and directory by just using the FileSystemObject

    There is a good example on the web at http://www.planet-source-code.com/vb...txtCodeId=6273

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by miranda
    the reason most people hard code the directory is so that the user cannot browse drives and directories on the server that they don't want them to see. You can get the drive and directory by just using the FileSystemObject

    There is a good example on the web at http://www.planet-source-code.com/vb...txtCodeId=6273

    Thanks Miranda. I realize that usually people wouldn't allow this process to happen. However I'm just learning ASP and this was one of my assignments to have a form that asks for the path and then outputs in an HTML table. It's like a 2 part thing. Appreciate the help! Many thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •