Guys please help, I have unique doubt?

If You have files like you described: uipath1,uipath2,uipath3 or any other, which You would like just to increase last number, You can use this expression:

Directory.GetFiles(“path”).Select( Function(w) Regex.Match(w.ToString,“\d+”).Value ).Max

It return the gratest number of file, e.g. if You have files uipath1,uipath2,uipath3, it will returns “3”.
It’s a string type and You just have to change “path” value for any full path You want.
Then in creating new file just increase this number by 1.

2 Likes