I am running a batch file on a data file. the data file is bulk copied into a database. The last line of the data file (which is passed to me and I do not have any control over it's creation) has a SPACE on a blank line.
I need to get rid of that space and blank line. This is Xp cmd and the file is a text file. I have tried using the for statement in my batch and that looks like this: for /F "tokens=*delims=" %%G IN (%2) DO Echo %%G >> %1
This gets rid of blank lines great, but if there is a space on a blank line, this will result in tossing in at the end of the file the state of echo. Any help would be great.