Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How can I rejoin two files into one?

Question: I split a file a while ago. I don’t have a copy of the program used and I can’t remember what it was. All I know is that it split the 2 files into segments ending in “.1” and “.2”. Is there a program out there that will universally rejoin files? Or do I have to keep hunting ’til I find the program that I used?

The term for what you’re attempting to do is called “concatenation” – basically splicing two files together to create a single file.

And the tool’s already on your machine.

Become a Patron of Ask Leo! and go ad-free!

The copy command in Windows will do it.

In a command shell:

copy file1 /b + file2 /b file3

Will join file1 and file2 to create file 3. The “/b” indicates that Copy should treat the file as binary rather than text.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

5 comments on “How can I rejoin two files into one?”

  1. Greatings.
    I would like to suggest an easier way to do the same process.

    Do just like this at the directory where pieces are:
    copy/b 01.ca1+02.ca2+03.ca3+04.ca4 wimamp.exe
    Where: first piece+2nd_3rd+4th and else,equals the final file name splited, which name you are supposed to previously know.

    For example I splited Winamp.
    System will act then:

    D:\Util\Win-util\Splitters\Fsplit>copy/b 01.ca1+02.ca2+03.ca3+04.ca4 wimamp.exe
    01.CA1
    02.CA2
    03.CA3
    04.CA4
    1 files) copyed(s).

    Reply
  2. follow below steps to split files…

    1. change extension to .rar of merged file
    eg. final.jpg to final.rar

    2. now open that .rar file and u can copy
    your inner files from there by extracting
    them…

    Best Luck

    Reply
  3. I used the command like

    copy /b file.jpg+hotfix.rar filehotfix.jpg

    Now the command is succ but now if i try to unzip i am not getting the hotfix.rar files what to do some one help me

    That’s correct – by prepending a .jpg to a .rar file like that you’ve broken the ability to decode the .rar. To be honest I’m not sure why you joined the two files together like that.

    Leo
    16-Aug-2012
    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.