Newbie to Powershell. I'd like to parse multiple files one after another. In order to do this, I need to load the files as a XML. This is my code so far:
for ($i=0; $i -le 5; $i++)
{
$contents = Get-ChildItem -Path $path -Force -Recurse
File |Select-Object -First $i | Select-Object -Last 1
$fl = $contents.Name
$xml.Load(".\downloads\Test\$fl")
}
If I remove for ($i=0; $i -le 5; $i++) it works. But I need it to work with the for loop. Any ideas?