If the file is ASCII, then you can do this very quickly with
JREPL.BATAssuming none of the columns contain the quoted pipe characters as part of the value, then:
jrepl "^((?:.*?\|){15}).*?\|.*?\|" "$1" /f "yourFile.csv" /o -
The above will overwrite the original file. If you want to preserve the original and write a new file, then use
/o "newFile.csv" instead of
/o -It can also be made to work if column values can contain quoted pipe literals. It even supports quotes within the quoted value (escaped as ""):
jrepl "^((?:\q(?:\q\q|[^\q])*\q\||.*?\|){15})(?:\q(?:\q\q|[^\q])*\q\||.*?\|){2}" "$1" /x /f "yourFile.csv" /o -
Dave Benham