|
FileObjects by Charles Carroll
The file object is in newer versions of VBScript.
filename=/learn/test/fileobjects.asp
<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>
|