I have a folder full of text files. In the file names, they have a file type and a unique ID. I want to grab all the files of filetype_1_ and store the directories an array so I can open the files and scan through them with another function. The part I am stuck on is filtering the results, all I want is the full directory of all the filetype_1_.
Any Idea how I can do this using Excel VBA?
filetype_1_@fileID1.txt
filetype_2_@fileID2.txt
filetype_2_@fileID3.txt
filetype_1_@fileID4.txt
filetype_1_@fileID5.txt
filetype_2_@fileID6.txt
One option I was thinking of was using the msoFileDialogFilePicker and filtering the results as *filetype_1_, then letting the user select all the files. But would I would rather do is use the msoFileDialogFolderPicker and letting VBA do the work of finding the files and storing the directory names in an array.
Any help on this would be greatly appreciated.