Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  Content Linker Library
     [next Lesson]  File Objects: Display Directory as Links/Graphics

FileObjects by Charles Carroll

The file object is in newer versions of VBScript.

   filename=/learn/test/fileobjects.asp

<Test Script Below>


<html><head>
<title>fileobjects.asp</title>
</head><body>
<%
mypath="/learn/test"

Set filesystem = CreateObject("Scripting.FileSystemObject")
Set folder = filesystem.GetFolder(server.mappath(mypath))

Set filecollection = folder.Files
For Each file in filecollection
    response.write file.name & "<br>"
Next

set filesystem=nothing
set folder=nothing
set filecollection=nothing
%>
</body></html>

Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site