Tag: logs
-
PowerShell Size-Based Log Splitter
A mash-up of the following links: Blog post “Split file csv by size” Replace Text in a String Stack Overflow Regex Remove-Comma-Between-Double-Quotes param ($path, $size) $src = $path $SplitPath = $src.replace(“.csv”, “_clean_{0}.csv”) # Read in source file and grab header row. $inData = New-Object -TypeName System.IO.StreamReader -ArgumentList $src $header = $inData.ReadLine() # Create initial output…