Like Us
Plus One
Follow Us
 Author Jeff Jones  Views 1367 View Original Article

I recently needed to parse a large CSV text file and break it into smaller batches.  Parsing text with PowerShell can easily be done.  The trick here was to manage two pointers $line (within original large text file) and $i (iterate current up to next break threshold).  The first CSV line with column headers from the original parent text file is preserved in all child CSV files.  Cheers!  Source Code # Read parent CSV $text = Get-Content '.\large-input-file.csv' # …
View Original Article

Recent Articles from @SPJeff