I have a weekly compilation report in which I take what could be daily reports (sometimes skipping a day or two) and copies their contents into a single workbook. Once each of the daily files have been compiled into a single worksheet, the workbook is saved as a .xls file.
I have been doing this manually for about a year, but I now want to automate it to make it less mindnumbing.
My difficulty comes from the naming conventions used for the file names. The file name starts with a date/time stamp, and finishes with a long name and a .TXT extension. For example:
Now, I have been able to find tons of examples on how to find .TXT files in a folder, but have not been able to modify them to look for the final sequence of characters in the file names. I would like to peel just those files meeting the naming convention specifications like the file above.
There will always be other .TXT files in the folder, but they will have different name conventions. Can anyone help me define a way to find the files I need then load them to an array so I can process them?
Thanks
I have been doing this manually for about a year, but I now want to automate it to make it less mindnumbing.
My difficulty comes from the naming conventions used for the file names. The file name starts with a date/time stamp, and finishes with a long name and a .TXT extension. For example:
Code:
20090729004101_AKMGH1875_CARDS_SEND.TXT
20090731013135_AKMGH1875_CARDS_SEND.TXT
Now, I have been able to find tons of examples on how to find .TXT files in a folder, but have not been able to modify them to look for the final sequence of characters in the file names. I would like to peel just those files meeting the naming convention specifications like the file above.
There will always be other .TXT files in the folder, but they will have different name conventions. Can anyone help me define a way to find the files I need then load them to an array so I can process them?
Thanks