Is there a command to find and access in all files in one folder

gabri_1981

Beta member
Messages
1
Hello,
i have a problem, maybe you can help me.

I am working with ASP.
My gain is to access in all Excel-files who are in one folder. Is there an command in ASP who says i want to see access in all files which are in that folder.

Best regards,
Joel
 
This should Help.
Code:
<%
'*****************************************************
'* Code written by Alexander Haneng (C) 1998-2001    *
'* FREE download from http://www.haneng.com/         *
'*****************************************************
%>

<HTML><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000">

<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 width = 100%>
<TR BGCOLOR="#000000"><TD><FONT COLOR="#FFFFFF"><B>Filename:</B></FONT></TD><TD><FONT COLOR="#FFFFFF"><B>Size:</B></FONT></TD><TD><FONT COLOR="#FFFFFF"><B>File type:</B></FONT></TD><TD><FONT COLOR="#FFFFFF"><B>Date created:</B></FONT></TD>
<%
' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder(Server.MapPath("./"))
'Loop trough the files in the folder
FOR EACH thing in MyFolder.Files
%>
<TR BGCOLOR="#F7F7E7"><TD><A HREF="/<%=thing.Name%>"><%=thing.Name%></A></TD><TD ALIGN=RIGHT><%=thing.Size%>bytes</TD><TD><%=thing.Type%></TD><TD><%=thing.DateCreated%></TD> 
<%
NEXT
%>
</TABLE>


</BODY></HTML>
 
Back
Top Bottom