File Listing for Current ASP Page Directory

CreateFile.asp (0.7 KB)
default.htm (0.6 KB)
driveinfo.asp (1.0 KB)
drives.asp (0.8 KB)
FileList.asp (1.2 KB)

 


sDir = Server.MapPath(".")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set objFldr = fso.GetFolder(sDir)
Set objFileColl = objFldr.Files
For Each file in objFileColl
	response.write file.Name & " (" & FORMATNUMBER(file.size/1000,1) & " KB)<BR>"
Next

Set objFldr = Nothing
Set objFileColl = Nothing
Set fso = nothing

 

FSO Demo Home