Jump to content

merge text files


TheFiresInTheSky

Recommended Posts

i have alot of text files on my computer.

id like to be able to put some in a folder, add that folder into a program, and have the program merge them all together with a line break or something inbetween each.

also must be freeware.

thanks!

Link to comment
Share on other sites

well its about 20 at a time.

they're lots of books, guides, stuff like that.

i noticed it did this when i converted pdf to txt files.

im gonna try your suggestion now glenn. :)

Link to comment
Share on other sites

  • Moderators

You can do it via a batch file as I do with my HOSTS files.

 

Note, that you need to create a spacer.txt file that has the line breaks you want and then merge them as such (note how the last filename doesn't have a + before it, that's the destination file):

 

COPY "Text File 1.txt"+"spacer.txt"+"Text File 2.txt"+"spacer.txt"+"Text File 3.txt" "Merged Text File.txt"

 

 

When you open the destination file you may have to remove one or more black square dots that may or will get inserted into the destination file.

Link to comment
Share on other sites

glenn, that works great, thanks!

andavari, i think i tried doing something like that but found out i could only do 2 at a time.

the only reason i wouldnt make a batch to do that is you need to put in the names of all the files which takes some time.

Link to comment
Share on other sites

  • Moderators

the only reason i wouldnt make a batch to do that is you need to put in the names of all the files which takes some time.

 

Yeah that's the annoying thing about Command Prompt or Windows itself. Although not so long ago I learned on this forum you can drag 'n drop files onto a WinXP Command Prompt window and the path and name will automatically be inserted for you without typing it in.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.