tonydemarco
asked on
Truncate or Pad Each Line In Text File using a DOS Batch File
I have a text file with uneven lines i.e. The first line ends at 185 characters and the next at 201 characters and so on.
I need a way to pad the short lines to the length of the longer lines so I can BULK INSERT into SQL with a format file (.fmt).
The format file uses "\r\n" to find the end of each line so the CrLf has to be in the same place at the end of each line.
I need a batch file to count the columns and insert spaces for the shorter lines.
I need a way to pad the short lines to the length of the longer lines so I can BULK INSERT into SQL with a format file (.fmt).
The format file uses "\r\n" to find the end of each line so the CrLf has to be in the same place at the end of each line.
I need a batch file to count the columns and insert spaces for the shorter lines.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER