Combining multiple txt files (or any file) 2 posts

OP Sun Oct 25, 2015 11:58 pm
User avatar
Legendary Family Member
  • Gender: Male
  • Posts: 6285
  • Joined: Jun, 2010
  • Advertisements: 45
  • Karma: 368
This dos command will allow you to merge all txt files contained in a folder into one txt file.

I used this command when I needed to combine 43 txt files containing retired IMVU names into a single txt file so it could be posted here: viewtopic.php?t=1073.

1) Copy the following command:
copy /v *.txt "filename.txt"

2) Paste it into notepad or your text editor of choice.

3) Replace "filename.txt" with whatever you want the final file to be name. Remember to keep the quotation marks. You can specify just a name if you want it to be saved in the same folder as the other files or you can specify a directory like this: "C:\User\User\Desktop\filename.txt"

4) Save the file as "merge files.bat". You can name it whatever you want but make sure you save it as a bat file.

5) Place the bat file you just created in the same folder as all of the txt files you want to merge and then double click it to run it.

What this will do is takes all of the txt files found in whatever folder you run this script in and merges them into a single file with the new file name. The /v switch verifies that new files are written correctly.

This can be used with other file types as well and you could even select a only a couple files instead of every file in the folder. If you want to know how to do that, simply modify the code like this:

copy /v [file]+[file]+[file] [new file]

copy /v 1.txt+2.txt+3.txt "new.txt"
Mon Oct 26, 2015 12:58 am
User avatar
TIM Enthusiast
Legendary Family Member
  • Gender: Female
  • Posts: 709
  • Joined: Sep, 2015
  • Advertisements: 2
  • Karma: 0
This would be very useful...thanks for sharing it with us! :roll: :roll: :roll:

Create an account or sign in to comment

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

Sign in

Already have an account? Sign in here


Create an account

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