• Thanks David,

    This is what i made based on several findings here and there.

    $inputFilename = "C:Temp20190924.TXT"
    $outstream = New-Object System.IO.StreamWriter "C:Temp20190624Output.txt"
    try {
    foreach ($line in [System.IO.File]::ReadLines($inputFilename)) {
    finally {

    It takes quite a while to finish.

    I will try your solution next and now you mention it, how can i add a progress bar to it?



  • Hi, Im relatively new to PowerShell but I have worked with Unix shell scripts for 10 years.

    2 questions:

    I have a 2GB text file with more than 23,000,000 lines. Is PowerShell able to handle such files?

    Second, I need column 18 thru 24 from this file. The file has a fixed width format.

    Without a doubt this can be done using PowerShell. Just don't know how.

    Thx for your time,

    Regards, Guus


  • 0
  • Guus became a registered member 2 months, 2 weeks ago

  • Guus's profile was updated 2 months, 2 weeks ago