0

Hi I would like to ask why my csv output still gets in a one or single cell.

here is the powershell script code:

$root = "C:\Users\devs"
$files = Get-ChildItem -Path $root -Filter *.txt

$data = ForEach ($file in $files){
    Import-Csv -Path $file.Name 

}

$data | Export-Csv -NoTypeInformation -UseCulture -Path (Join-Path $root "out.csv") 

enter image description here

I want the output like this.

Keith Miller
  • 702
  • 5
  • 13
  • 1
    Welcome to SO. Please [format your code as code](https://stackoverflow.com/help/formatting). Thanks in advance. – Olaf Feb 13 '23 at 05:55
  • Please also show input examples and [don't use images](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors). See also: [how to ask](https://stackoverflow.com/help/how-to-ask) – iRon Feb 13 '23 at 08:09

0 Answers0