" used this expression to get the name of the latest folder created based on the creation date and it gave me the folder name back, only the name not the full path and it’s stored into a variable of type “directory.info”
variable name is “name”
{New DirectoryInfo(“my path”).GetDirectories().OrderByDescending(function(d) d.CreationTime).First()}"
the last app entry can be found with a Regex, Linq Combination:
(From x In arrNames
Where Regex.IsMatch(x,"(?<=app-)\d{2}.\d{2}.\d{1,2}\b")
Let m = Regex.Match(x,"(?<=app-)(\d{2}).(\d{2}).(\d{1,2})\b")
Order By CInt(m.Groups(1).Value),CInt(m.Groups(2).Value),CInt(m.Groups(3).Value)
Select x).Last
Thanks to both of you @ppr@Steven_McKeering, your comments were very helpful to me, but @ppr response using Regex was what I used since it gives me the entire path where the folder is located and of course the most important thing is that it gives me the latest version