Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP/IE Window List - Easy for Novice

Status
Not open for further replies.

ErocM

Programmer
Sep 23, 2002
3
US
Hi everyone! I was wondering if anyone had an idea on this one. I have a virtual directory I have alot of downloadable files on. The thing is I just mapped directly to this folder, made it browsable, which keeps me from having to list them manually. Here is an example Anyone know how I can format this window to be a narrow list or have a better way of listing them instead of doing the browse folder option? If I display this it looks generic and I cannot the beginner how to download the file or any info of what the file is. Any help would be GREATLY appreciated.

Thanks
ErocM
erocm@mail.com
 
hmm...with javascript it may not be possible, at least not easily.

with server-side scripting such as ASP, it's a breeze. if you don't have server-side capabilities, i'd just make an html page listing them all.
=========================================================
if (!succeed) try();
-jeff
 
ASP is definitely an option....I tried a few other ASP scripts but all of them I have to list the files manually in the database and I it takes too long, especially if I have to add it into the database for each upload.

Any ideas as far as ASP goes?

Thanks again
Eric M.
 
sure,

with asp you just get the folder containing all the files, and loop through the Files collection. here's one that I use that's generic - it shows the contents of whatever folder it's in:
[tt]
<%
Option Explicit
Response.Expires = 0
%>
<html>
<head>
<title>Index</title>
</head>
<body>
<%
Dim oFS, oFol, sPT, File

Set oFS = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
sPT = Request.ServerVariables(&quot;PATH_TRANSLATED&quot;)
Set oFol = oFS.GetFolder(Left(sPT,InStrRev(sPT,&quot;\&quot;)))

For each File in oFol.Files
If File.Name <> &quot;index.asp&quot; Then
Response.Write(&quot;<a href=&quot;&quot;&quot; & File.Name & &quot;&quot;&quot;>&quot; & File.Name & &quot;</a><br />&quot; & VbCrLf)
End If
Next
%>
</body>
</html>

[/tt]
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top