I have a directory of about 3,000 files and I need to get a few filenames into an array.
So out of this list of files, I would only want the ones that match "Auto Test" and from the last 30 days. I was attempting to use the msoFileDialogFilePicker, but that's turned into a total deadend.
AAA Test 2016-12-02.csv
AAA Test 2016-12-05.csv
AAA Test 2016-12-06.csv
Auto Test 2016-11-10.csv
Auto Test 2016-11-11.csv
Auto Test 2016-11-15.csv
Auto Test 2016-11-16.csv
Auto Test 2016-11-29.csv
Auto Test 2016-11-30.csv
Auto Test 2016-12-01.csv
Auto Test 2016-12-02.csv
Auto Test 2016-12-05.csv
Auto Test 2016-12-06.csv
FalseTest 2016-12-02.csv
FalseTest 2016-12-05.csv
FalseTest 2016-12-06.csv
I've been working with these as variables.
So my array FileNames would result in only these in the array (as of today's date):Please Login or Register to view this content.
C:\Files\Auto Test 2016-11-30.csv
C:\Files\Auto Test 2016-12-01.csv
C:\Files\Auto Test 2016-12-02.csv
C:\Files\Auto Test 2016-12-05.csv
C:\Files\Auto Test 2016-12-06.csv
I know it's not much to go on, I would prefer to post a macro that would require a few minor fixes, but this area (arrays) is not a strength. Any help would be appreciated, I'm spinning in circles on this one. Can it even be done?
Bookmarks