I need to be able to move a group of files from one location to another, and after verifying that the counts match, delete the original. That part is easy. The wrinkle is that I only want to get files where the date modified is for a certain month. So I need to move all the files from January to the new folder and not touch Feb. dated files.
I'm currently using the below code but how can I modify it to bring back just those within a given date range (or month)
For Each f In lstFolders
For Each sf In f.lstSubFolders
BeginFileCnt = System.IO.Directory.GetFiles(f.rootPath & "\" & sf).Length
For Each fi As FileInfo In New IO.DirectoryInfo(f.rootPath & "\" & sf).GetFiles("*.*")
fi.CopyTo(DestinationPath & "\" & f.rootFolder & "\" & sf & "\" & fi.Name)
EndFileCnt = System.IO.Directory.GetFiles(DestinationPath & "\" & f.rootFolder & "\" & sf).Length