I don't know any method that will return an array of files. Many methods contains a kind of files collection from which you can create your array.
Up to last week, I was the guy who told to whom ever want to ear it to use FSO (great sample at
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q190882) but I recently found a solution where the old DIR statement was a
LOT faster. I was in the need of filtering some folders having each a lot of files and using the DIR statement (which allow wildcards) was a lot faster than FSO (that doesn't allow wildcards).
So my answer now is : depending on your process, you may consider FSO or DIR (but I am still the best fan of FSO!).
>Hi,
>
>What is the easiest/best way to create a one dimensional array listing all the files in a given path (without worrying about files in any sub-folders).
>
>For example, if I wanted an array with all the files in "C:\Source" ...
>
>Thanks in advance.
>
>Al
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com