Does anyone have any code using the file systems objects, to enumerate through each directory in a certain path, for example, "c:\", and listing all files in all of the directories. Thanks
Printable View
Does anyone have any code using the file systems objects, to enumerate through each directory in a certain path, for example, "c:\", and listing all files in all of the directories. Thanks
I have attached a module wich contains a FindFIlesAPI function and uses some API calls.
You can use this to cycle through all files as follows:
Call FindFilesAPI("c:\", "*.*")
Or you can just look for specific files or wildcard matches.
Call FindFilesAPI("c:\", "*.doc")
I must say that I didn't write this code, I got it from a web site somewhere but it was pretty good I thought.
It doesn't use the FileSystemObject but it does what you want.
Hope this helps,
Nathan Liebke
:)
Perfect! Thank You