CoderZone.org
Pages: 1 « previous     next »
  Print  
Author Topic: ASP - List files in a directory on a web page  (Read 7378 times) Bookmark and Share
cuberat
Newbie
*
Posts: 40


View Profile
« on: Dec 08, 2010, 06:23:09 pm »

Wrapped with some style (CSS) and nice background images, this makes it easy to present a polished interface for sharing files.

Code:  
Highlight Mode: (ASP)
  1. dim fs,fo,x
  2. set fs=Server.CreateObject("Scripting.FileSystemObject")
  3. set fo=fs.GetFolder("X:\www\resources")
  4.  
  5. for each x in fo.files
  6.  Response.write("<a href='"& x.Name & "'>" & x.Name & "</a><br />")
  7. next
  8.  
  9. set fo=nothing
  10. set fs=nothing
  11.  
 
Logged
Telonik
Newbie
*
Posts: 5



View Profile
« Reply #1 on: Dec 08, 2010, 07:00:36 pm »

Nice, I'll be using this. Thank you!

Wrapped with some style (CSS) and nice background images, this makes it easy to present a polished interface for sharing files.

Code:  
Highlight Mode: (ASP)
  1. dim fs,fo,x
  2. set fs=Server.CreateObject("Scripting.FileSystemObject")
  3. set fo=fs.GetFolder("X:\www\resources")
  4.  
  5. for each x in fo.files
  6.  Response.write("<a href='"& x.Name & "'>" & x.Name & "</a><br />")
  7. next
  8.  
  9. set fo=nothing
  10. set fs=nothing
  11.  
 
Logged
Tags:
Pages: 1
  Print  
 
Jump to: