Anyone know how to import all of the file names in a folder into an array?

Here's what I'd like to be able to do:

for the following folder 'c:\test' the contents are:
file1.txt
file2.txt
file3.txt


I'd like to be able to check the file contents of c:\test\ and somehow have the three filenames written into an array (as strings). First the script needs to count the number of files in the folder and then loop through each file name so that it can write each name into the array. I'll then do some string manipulation to check that certian files are present in the folder before starting a secondary process.


I've been reading up on the FileSystemObject but I'm afraid I haven't figured out how to use that object to figure this out.

Any help would be appreciated. I feel like this shouldnt be very hard to do, i just dont know what functions to use.

Thanks!