I have a folder of 1000 files and some of them belong to each other, which means that their name starts similarly such as:
20170821.pdf; 20170821_02.pdf, 20170821_03.pdf, 20170820.pdf, 20170820_02.pdf etc.
I am able to get the name of the latest file with File = new DirectoryInfo(myPath).GetFileSystemInfos().OrderByDescending(function(fi) fi.CreationTime).First()
but I need to do a comparison with the next file if it has the same name in the beginning. Can you please help me?
My path contains all these files, and as you will see the result in the message box is 2 because in the arrays the items start in 0 (It is said, there are 3 elements that contains the name “Archivo” without taking into account the extension ).