Home Forums Programming Powershell Concat hard value to each row of Hash Table RE: Concat hard value to each row of Hash Table

  • I've only used the WebClient class to download data, not upload. Maybe someone else will be able to answer. But reading the docs it looks like that method requires a file. If you wanted to try streaming it you might look into the OpenWrite method.

    Since you said you're working with many rows and columns instead of loading everything into an array you can just write to a file as you go.

    Here's a modification of my first answer.

    $OutFile = 'FileName.txt'

    Foreach ($line In Get-Content SampleData.txt) {

    "{0}{1}{0}`n" -F $bound, $line | Out-File -FilePath $OutFile -Append

    }