<% Option Explicit %>
<html>
<head>
<title>ThaiCreate.Com ASP List Files In Directory</title>
</head>
<body>
<%
Dim objFSO,objFiles,Vol
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
set objFiles = objFSO.GetFolder(Server.MapPath("MyFiles"))
For Each Vol in objFiles.Files
Response.write(Vol.Name&"<br>")
Next
Set objFiles = Nothing
Set objFSO = Nothing
%>
</body>
</html>