To get the details of files, Directory.Getfiles("DirectoryPath", "*.zip") is returning me the all the files in a directory. Each file has a DateTime stamp in the Filename as a Postfix:
e.g. {87fbf03b-ec94-44a0-aac5-ffbaf6416700}_20100204_145154634008919142146021.zip
I am splitting out the GUID from the above file name.
string filName = Path.GetFileNameWithoutExtension(testFile).Split('_')[0];
This explanation is just to tell you guys that thats how I can have more than one file with the same name in the same directory.
Now my question is How can i get the results same like Group by query in T-SQL? I need to know how many times a similar file name is there in that directory.
Is it possible through linq? Yes then how?