|4GuysFromRolla.com : ASP FAQS : FileSystemObject|
|Question:||How can I programmatically list the contents of a directory on the Web server?|
|Answer:||With the FileSystemObject you can (fairly easily) programmatically obtain all of the files of a given directory on the Web server. To accomplish this task we'll need to complete the following steps:|
1.) Create an instance of the FileSystemObject object
2.) Use the FileSystemObject to return a Folder object (which contains information about a particular directory).
3.) Use a For Each ... Next loop to iterate through each file in the Folder object.
So, let's examine some code that will handle this...
That's it! The Folder object contains a slew of information about a particular folder (in this case, we obtained information about the
FAQ posted by Scott Mitchell at 11/24/2000 3:57:36 PM to the FileSystemObject category. This FAQ has been viewed 69,860 times.
Copyright 2018 QuinStreet Inc. All Rights Reserved.
Advertise | Newsletters | E-mail Offers