Combining multiple txt files (or any file)

DataMine
by DataMine · 2 posts
8 years ago in Batch
Posted 8 years ago · Author
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.


Instructions:
1) Copy the following command:
Code
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:

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


Example:
Code
copy /v 1.txt+2.txt+3.txt "new.txt"

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

SIGN IN NOW

Create an account

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

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts