We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
'DECLARE FOLLOWING VARIABLES bPath = "C:\Temp\Test2\" 'DESTINATION PATH aBeginWith = "File1" 'FILE BEGINS WITH aDate = CDate("01-JAN-2010") 'FILES CREATED AFTER THIS DATE 'CREATE FILESYSTEM OBJECT Set fso = CreateObject("Scripting.FileSystemObject") 'SET THE SOURCE PATH Set aPath = fso.GetFolder("C:\Temp\Test") 'SOURCE PATH 'SEARCH THE FILES WITH GIVEN CRITERIA AND COPY THEM TO DESTINATION PATH For Each file In aPath.Files If RIGHT(file.Name, 4) = ".csv" and Left(file.Name, Len(aBeginWith)) = aBeginWith and file.DateCreated > aDate Then file.Copy bPath & file.Name End If Next
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.