(Solved) – VBA Searching and finding most recent (every 30 minutes) files added to a large folder of files


my question is a pre-code question, as I would like to code the fastest approach.

Context: I have a folder with 150,000 text files (1-2kb in size each). What I would like to do is for the vba macro to go into this folder and find all the files created in the previous half hour (30 mins). I would like it to do this on a recurring basis every 30 minutes. This should extract approx. 50 files each time. Is it:

a) Better to use the timestamp of the files and extract only the files from current computer timestamp – 30 minutes

b) Better to compare all file names, and only pull out those which are not in the list (that I am storing in excel), following the comparison (I feel like this will really slow down the action).

c) Is there another faster way?

I am seeking the fastest route before I begin coding. Thanks in advance for any help or support!

Leave a Reply

Your email address will not be published. Required fields are marked *