Suppose you have files like:
NewFile.part01.zip
NewFile.part02.zip
NewFile.part04.zip
NewFile.part06.zip
NewFile.part07.zip
How do you get the files in this patter so you only get a SINGLE file called "NewFile" and also get the missing ones as integers, in this case (3, 5)
Right now I am checking files one by one and if the name only differs in the suffix then skipping, also checking the number is +1 than the previous, etc.
But I thought someone might have a better, more elegant way of doing this. Linq, regex, etc?
EDIT:
So the way to know when the continuous files end is when the last file size has a difference than others. So it's like 200mb, 200mb, 200mb, ..., then the last one is 196mb.
My input is the full file list with the path like:
"C:\NewFile.part01.zip"
"C:\NewFile.part02.zip"
...