Hi,
I need to create a csv file from a txt file. However it is not working.
"Count,TestID" | Set-Content C:\VPS\TRH_Report.csv foreach ($s1 in Get-Content C:\VPS\TRH_Report.txt) { $s1 | Add-Content C:\VPS\temp1.txt (gc C:\VPS\temp1.txt) | sc C:\VPS\temp1.txt (get-content C:\VPS\temp1.txt) | add-content C:\VPS\TRH_Report_Final.csv remove-item C:\VPS\temp1.txt }
TRH_Report.txt The txt file looks something like this.
Count,TestID
178,007501
84,007350
24,004140
81,007601
21,004120
84,003100