I have rows in excel with a file structure for example.
Row 1 c:\User\Folder100\13-25\File100.log
Row 2 c:\User\Folder200\11-16\File200.log
Row 3 c:\User\Folder300\21-20\File300.log
Row 4 c:\User\Folder400\13-25\File400.log
Row 5 c:\User\Folder400\9-10\File400.log
Row 6 c:\User\Folder500\8-16\File500.log
Row 7 c:\User\Folder600\8-16\File600.log
Row 8 c:\User\Folder700\11-16\File700.log
Row 9 c:\User\Folder700\9-40\File700.log
With the first rows there aren’t any problem because the file logs are different but with the rows (4 and 5) a There are the same log in two different folders “c:\User\Folder400\13-25\” and c:\User\Folder400\9-10\ I would like to keep just 13-25(eliminate Row 5) because has more recent time.
Also with the lines 8 and 9 I just want to keep row 8 (11-16)
Row 1 c:\User\Folder100\13-25\File100.log
Row 2 c:\User\Folder200\11-16\File200.log
Row 3 c:\User\Folder300\21-20\File300.log
Row 4 c:\User\Folder400\13-25\File400.log
Row 6 c:\User\Folder500\8-16\File500.log
Row 7 c:\User\Folder600\8-16\File600.log
Row 8 c:\User\Folder700\11-16\File700.log
(eliminated row 5 and 9)
Do you know any Idea how to made it in VBA¿?
This does not exactly serve the purpose, but serves to illustrate a way by which you could go about problems like this.
It takes into account the filename and the time string preceding it only. The folder can be added if necessary.
Main Module:
To add/remove dictionary entries:
Input:
Output: