Remove blank box from text file

June 23, 2009 at 07:02:09
Specs: Windows XP
I have a batch file that merges multiple text files into one. It works great excpet for the "blank box" at the end of the file. The last line of each individual file (*.idx) is blank. If I remove that line the final file (idx.idx) is created all on one line. Is there anything I can add to the batch file to remove that box from the final file?

Here is the batch:

COPY c:\index\*.idx c:\index\IDX.id1
rem DEL /Q /F c:\index\*.idx
MOVE c:\index\IDX.id1 c:\index\idx.idx


Here is a sample of what the final idx.idx file looks like:

\\path,account,type,date
\\path,account,type,date
\\path,account,type,date



I've tried a couple things on this site without any luck. Any help would be greatly appriciated!


See More: Remove blank box from text file

Report •


#1
June 23, 2009 at 07:34:17
Add the /B switch at the end of the COPY command.

Report •

#2
June 23, 2009 at 09:34:10
Worked perfectly. Thanks!!

Report •

Related Solutions


Ask Question