asp scriptto populate a select list wirh .xls files from a folder in the web

I need to have a select list populated with certain files (mainly .xls) that are in a folder on the web.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

sam_norianConnect With a Mentor Commented:
Hi, How about this....

dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(Server.MapPath(".") & "\..\Your Folder\")
<select name="FileList">
for each x in fo.files
  Response.write("<option value=" & CHR(32) & & CHR(32) & ">" & & "</option>")
set fo=nothing
set fs=nothing

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.