devxlogo

Dynamically Create a Web Page From an FTP Directory Listing

Dynamically Create a Web Page From an FTP Directory Listing

It’s possible to dynamically create a Web page from an FTP directory listing of files with a particular extension. While there are sophisticated components (.DLLs) that you could add, you could also use the FileSystemObject and do a little filtering in the ASP script. Here’s one approach that builds on the sample code found in the IIS 4.0 online help:

 Sub ShowFolderList(folderspec)Dim fs, f, f1, fc, sSet fs = Server.CreateObject	("Scripting.FileSystemObject")Set f = fs.GetFolder(folderspec)Set fc = f.FilesFor Each f1 in fcIf instr(f1.name,".zip") thenresponse.write f1.name & "" end ifNextEnd SubShowFolderList("e:inetpubftproot")
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist