I have an array of file names in Powershell, and I would like to prepend a path to each of them and get the result in a new array.
In C# I could do this using Linq...
var files = new string[] { "file1.txt", "file2.txt" };
var path = @"c:\temp\";
var filesWithPath = files.Select(f => path + f).ToArray();
But what is the idiomatic way to do this in Powershell? It looks like there is a foreach syntax I could use, but I figure there must be a more concise, functional way to do it.