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>

There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too. a $5 tip buys him lunch at McDonalds, a $20 tip buys his kid Hitoshi a new computer game, a $39 tip buys his daughter Michiko a few nice outfits. See our donor list.