I'm looking for a way to truncate text to 18 characters (if it's not already 18 characters) before it's copied to a folder. The text structure will always be the same and I need to truncate the lines between the 2nd and 3rd caret:
12345^2020-2021^This is the line I need to have truncated to 18 characters^05152020
67891^2019-2020^This is the line I need to have truncated to 18 characters^05152020
I already have a batch to copy the file but wondering if I can use a batch to truncate it first, then copy it? The file is on a Windows server. Thanks!