Computing.Net > Forums > Programming > Remove blank box from text file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Remove blank box from text file

Reply to Message Icon

Name: kushdogg
Date: June 23, 2009 at 07:02:09 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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!



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: June 23, 2009 at 07:34:17 Pacific
Reply:

Add the /B switch at the end of the COPY command.


0

Response Number 2
Name: kushdogg
Date: June 23, 2009 at 09:34:10 Pacific
Reply:

Worked perfectly. Thanks!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Remove blank box from text file

Delete blank lines from a text file www.computing.net/answers/programming/delete-blank-lines-from-a-text-file/14525.html

remove string values from text file www.computing.net/answers/programming/remove-string-values-from-text-file/15756.html

Adding values in text file via VBS www.computing.net/answers/programming/adding-values-in-text-file-via-vbs/15869.html