www.webdeveloper.com
Results 1 to 6 of 6

Thread: Need a ASP Script

  1. #1
    Join Date
    Dec 2003
    Posts
    7

    Need a ASP Script

    I need a ASP script that can automically populate what ever files are inside a folder and list them on a page so to be able to download them? Is there such a file?

  2. #2
    Join Date
    Dec 2003
    Location
    A series of tubes known as the "internets"
    Posts
    2,165
    try the asp forum.
    "Outside of a dog, a book is a man's best friend. Inside a dog, it is too dark to read." - Mark Twain

  3. #3
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    moved...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  4. #4
    Join Date
    Sep 2004
    Posts
    43
    You're going to want to use a FileSystemObject. For more information, go here .

    Code:
    <%
    dim fso,f,myfiles,fl,myfolder,l
    myfolder="foldername"
    set fso=server.createobject("scripting.filesystemobject")
    f=fso.getfile(Server.Mappath(myfolder))
    set myfiles=f.files
    for each fl in myfiles
    l=l & "<a href=""/" & myfolder & "/" & fl.name & """>" & fl.name & "</a>" & "<br>"
    next
    response.write s
    %>

  5. #5
    Join Date
    Dec 2003
    Posts
    7
    How would I put that into a code... Right now I try to put it into a page it it dosen't seem to work correctly..

  6. #6
    Join Date
    Sep 2004
    Posts
    43
    Originally posted by iampedro
    How would I put that into a code... Right now I try to put it into a page it it dosen't seem to work correctly..
    That is the code, but are you getting an error? If so, what type of error?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles