| 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.
If you want to get a listing of subfolders of a folder, you can use the same technique to iterate through the SubFolders collection of the Folder object.
See the following sample code: |