• Sara posted an update in the group Group logo of PowerShellPowerShell 2 months ago

    Can any one give me some suggestion for the Powershell script coding. I need to read the cSV file and change the record format by removing the ‘,’ to write it in a new txt file.
    01MU,20220721,132.47,132.47 — this is how the CSV will look

    01MU20220721013247000013247000013247000 — This is how i want in the txt file

    The record is from CSV is having 1000 records every day. Could you please share the logic or sample code to accomplish the action.

    • If you just need to remove comma from each record, this one liner can help:

      (Get-Content .\yourCsvFile.csv) -replace ',', '' | Out-File .\yourTxtFile.txt 
  • Sara became a registered member 2 months ago

    avataravatar
© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account