survey/RawData/datcfile/Lub001
 |
survey/RawData/datcfile/Lub001
<%
' Just wrap your existing page around this code.
' put in the folder name below relative to the directory that this script is in
' DO NOT put leading or trailing slashes though.
' DO NOT use backslashes at all regardless of the server your on.
folder = "Lub001"
' The table shows the filename as a link, the date last modified and the file size
' Adjust the table and columns as needed. Delete columns if you don't need them
' Find out what type of server we are on and the server data
If Left(server.mappath("."),1) = "/" Then
strslash = "/"
Else
strslash = "\"
End If
servername = Request.Servervariables("server_name")
scriptpath = Request.Servervariables("script_name")
scriptpath = Mid(scriptpath,(Instrrev(scriptpath, "/")),1)
Dim filesobj, fileslist, fname, posnumright, dirlist
dim f, dflm, obj
Set filesobj = Server.CreateObject("scripting.filesystemobject")
Set fileslist = filesobj.GetFolder(server.mappath("..") & "/" & folder)
Set dirlist = fileslist.SubFolders
%>
File | Date | Size |
<%
For each thing In fileslist.files
posnumright = instrrev(thing, strslash)
fname = right(thing,(len(thing)-posnumright))
Set f = filesobj.GetFile(thing)
fdlm = f.datelastmodified
If fname <> "default.asp" Then
If f.size > 1023 Then
If f.size > 1048576 Then
fsize = CStr(CInt(f.size / 1048576)) & "M"
Else
fsize = CStr(CInt(f.size / 1024)) & "K"
End If
Else
fsize = CStr(f.size) & " bytes"
End If
physicalpath = server.mappath(".")
%>
" target="_blank"><%=Server.HTMLEncode(fname)%>
|
<%=Server.HTMLEncode(fdlm)%>
|
<%= Server.HTMLEncode(fsize) %>
|
<%
End If
Set f = Nothing
Next
%>
Directories
|
<%
For each obj In dirlist
Req = Server.URLEncode(Path & Obj.Name)%>
"
<%=Obj.Name%>
|
DIR |
<%
Next
Set fileslist = Nothing
Set filesobj = Nothing
%>
|