Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Param
  2. (
  3. $local_file_name
  4. )
  5.  
  6. $file = Get-Content $local_file_name
  7.  
  8. $total = $data.Length
  9. $header_item_count = $file[0].Split(",").Count
  10. $i = 1
  11.  
  12. $data | ForEach-Object {
  13. $line_item_count = $_.Split(",").Count
  14.  
  15. if ($line_item_count -ne $header_item_count)
  16. {
  17. "Line [$i/$total] - [$line_item_count] vs [$header_item_count]"
  18. }
  19.  
  20. $i++
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement