edman thank you for your help on this, your 2nd batch file to rename the files will be helpful. The first one does not really apply to what I wanted. In the original message I should have been more clear, the text in these documents varies rapidly, it could say
"
how to tame a wild elephant
in the wild you would do this but at a zoo you do this
"
and another text document could say
"
walking up the street with your friends is fun
you can kick over trash cans and look at speeding cars
"
In both cases I would want the 5 or so carriage returns eliminated and brought down to 1. That was the point of my original message. The batch file that Mechanix2go wrote works perfectly for this. The only problems I had were the ones mentioned in my later post. It appears as though you solved this for me with the batch file that renames the .new files to .txt and the .txt to .old.
The only other thing I need the original batch file to do is leave the .txt files that it is working on and the new .txt files in the same subfolder when it is run in a directory with subdirectories.
I.E. upon execution in a folder with sub folders and files:
\Atlanta\
\1.txt
\atlantafools.txt
\atlantabasketball.txt
\Boxes\
\bigbox.txt
\cardboard.txt
\Cards\
\collecting.txt
\values.txt
It would produce
\Atlanta\
\1.txt
\1.new
\atlantafools.txt
\atlantafools.new
\atlantabasketball.txt
\atlantabasketball.new
\Boxes\
\bigbox.txt
\bigbox.new
\cardboard.txt
\cardboard.new
\Cards\
\collecting.txt
\collecting.new
\values.txt
\values.new
Then I would run the batch file to convert the extensions of .txt to .old and .new to .txt and we would end up with..
\Atlanta\
\1.old
\1.txt
\atlantafools.old
\atlantafools.txt
\atlantabasketball.old
\atlantabasketball.txt
\Boxes\
\bigbox.old
\bigbox.txt
\cardboard.old
\cardboard.txt
\Cards\
\collecting.old
\collecting.txt
\values.old
\values.txt
With the batch files you have provided so far and some simple file management I can now complete my tasks quickly and efficiently. Thank you all for your help and consider my issue solved.
This entire forum topic should be tagged with keywords like:
duplicate line removal, extra line removal, extra carriage removel, and extra bland line removal, multifile extra blank line removal
It was almost impossible to find software that would do it. Then I found you guys. :-)