I have a set of folders and I need to store the path of a particular one in a variable $folder.
The set of folders are all children of a parent folder we'll call "parent". There are a bunch of folders with numeric names and one with a non numeric name.
Here is an example of what is in the "parent" folder:
I want a powershell command that will store the path to the latest version folder (in this case "C:\parent\184.108.40.206") in my $folder variable. I think the best approach would be to filter the non numeric folders with a regex (something like "/d./d./d./d")
and then use the pipeline and gci along with a command that would take the item at the bottom of the list.
However I do not have much experience with the Powershell pipeline and was wondering if any talented Powershell users could help me with this problem.