List and Copy Files ( VBA for Excel )

This program finds all the files in a certain directory. This includes the files in the subfolders. The user provides a start and end date. The program checks the modification date of each file. If the file falls in the range specified it will be listed in an excel worksheet. Among these files the user can select the ones he wishes to copy to another directory.

 

Choosing the Folder Path:

In another worksheet, the user is able to select the location of the folder to search and the output folder to copy the files to. This is done using command buttons. Upon clicking each  of these buttons a folder dialog will appear asking the user to select a path:

Folder Dialogs
Choosing the Start and End Dates:

Drop down lists are provided for selecting the start and end dates. The modification date of each file is compared to these values. If it falls inside the range, then it is listed:

Day
Month
YEar

Get Files Button:

By pressing this button, all the files in the selected directory that has a modification date that fall between the start and end date selected by the user will be listed. This includes the files in the subfolders as well:

Get Files
Copy Files Button:

The user can put a “1” in column Q for each row he wishes to copy to the output destination.  After pressing the Copy Files button those files will  be copied to the target destination:

Copy Files

Result:

In the figure below you can see the copied files in the target destination:

Result

If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website  www.software-solutions-online.com

Live Chat