title: Export-CSV only gets the "Length"
body: <p>when  I try to export to a CSV list, I only get all number for "Length"
  <code>.Count</code> property until the split point is reached, then split the CSV array to a new file with a new name that will be used from this point on. What might be the issue?</p>
  
  <pre><code>$RootFolder = Get-Content "c:\DRIVERS\myfile.txt"
  
  foreach ($arrayOfPaths in $RootFolder){
  
    $csv  = $arrayofPaths -replace '^\\\\[^\\]+\\([^\\]+)\\([^\\]+).*', 'C:\output\Company_name_${1}_${2}.csv'
    $csvIndex = 1
    $maxRows = 1000000
    $rowsLeft = $maxRows
  
    Get-ChildItem $arrayOfPaths -Recurse | Where-Object {$_.mode -match "d"} | ForEach-Object {
    #$csv  = $_.FullName -replace '^\\\\[^\\]+\\([^\\]+)\\([^\\]+).*', 'C:\output\Company_name_${1}_${2}.csv'# &lt;- construct CSV path here
    $path = $_.FullName
    $thisCSV = Get-Acl $path | Select-Object -Expand Access |
      Select-Object @{n='Path';e={$path}}, IdentityReference, AccessControlType,
                    FileSystemRights |
      ConvertTo-Csv
  if ($thisCSV.count -lt $rowsLeft) {
      $thisCSV | Export-Csv $csv -append -noType
      $rowsLeft -= $thisCSV.count
  } else {
      $thisCSV[0..($rowsLeft - 1)] | Export-Csv $csv -append -noType
      $csvIndex++
      $csv = $csv -replace '\.csv$', "$csvIndex.csv"
      if ($thisCSV.count -gt $rowsLeft) {
          $thisCSV[$rowsLeft..($thisCSV.count - 1)] | Export-Csv $csv -append -noType
      }
      $rowsLeft = $maxRows - ($thisCSV.count - $rowsLeft)
  }
  
  
    }
  
  }
  </code></pre>