Elliott C. Back: Internet & Technology

Combine Split Files in Windows

Posted in Code, Computers & Technology, Microsoft by Elliott Back on March 10th, 2007.

I recently ran into an issue where I had about 7.5 GB of files split into 512M chunks downloaded from linux machine. The files had been generated using the split command:

split -b 512m files.tgz

This created the following files:

-rw-rw-rw- 1 user group 536870912 Mar 9 20:44 xaa
-rw-rw-rw- 1 user group 536870912 Mar 9 20:46 xab
-rw-rw-rw- 1 user group 536870912 Mar 9 20:49 xac
-rw-rw-rw- 1 user group 536870912 Mar 9 20:51 xad
-rw-rw-rw- 1 user group 536870912 Mar 9 20:53 xae
-rw-rw-rw- 1 user group 536870912 Mar 9 20:55 xaf
-rw-rw-rw- 1 user group 536870912 Mar 9 20:57 xag
-rw-rw-rw- 1 user group 536870912 Mar 9 20:59 xah
-rw-rw-rw- 1 user group 536870912 Mar 9 21:01 xai
-rw-rw-rw- 1 user group 536870912 Mar 9 21:03 xaj
-rw-rw-rw- 1 user group 536870912 Mar 9 21:05 xak
-rw-rw-rw- 1 user group 536870912 Mar 9 21:07 xal
-rw-rw-rw- 1 user group 536870912 Mar 9 21:09 xam
-rw-rw-rw- 1 user group 536870912 Mar 9 21:12 xan
-rw-rw-rw- 1 user group 222082405 Mar 9 21:13 xao

I wanted to combine them in windows and looked around for a while until I realized you can use Microsoft’s copy utility in binary mode!

copy /b xa* files.tgz /b

Now I’m all done! Hurray for built-in utilities.

This entry was posted on Saturday, March 10th, 2007 at 1:55 pm and is tagged with rw 1, split files, hurray, user group, chunks, xa, gb, linux, microsoft. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

19 Responses to “Combine Split Files in Windows”

  1. Robert says:

    Is there a way to split a file combined with Copy /b command right back to the original file components? That is, instead of:

    Copy /b file1+file2 file3

    I am looking for something doing just reverse like:

    Split /b file3 file1 file2

    Is there such a utility for Windows? I think Windows should provide such a tool since it has the combining tool (Copy /b).

    Thanks in advance!

  2. gilberto says:

    Thanks, it is very helpful!; i think you can use the “type xa* > file.tgz” command in a simmilar manner :)

  3. Eric says:

    Thanks batman! You saved my day!

  4. Perfect, just what I was looking for. Am in China on an unstable network connection and can’t get upload huge file into S3. With this and then a Win2k8 instance I have running in EC2 can get the job done quicker, cheers!

  5. David says:

    it needs to be done on a NTFS file system

    FAT32 does not recognize files bigger than 4Gb

  6. John Hendriks says:

    Thanx for the tip !
    Until now i used the CombineFiles-command of TotalCommander, which also works fine, but the “copy”-version is more elegant!

  7. MagusVivendi says:

    Many thanks… Really a great tip.

  8. taimoor says:

    Thanks! Absolutely awesome command, I’ve spent 2 hours messing around with duff alternatives and this worked instantly :-)

  9. Vipin says:

    Good one. Thanks for the tip.

  10. lcabral says:

    Thanks! Much oblieged
    I was looking and only could find free/proprietary software to do something I was almost certain it could be done in the prompt command

    You saved my day !!!

  11. Eligio says:

    I’m getting not enough space where the hd space has 209gb free space and the total files to be combined is only 10gb.

  12. Vinay V says:

    Great tip. You saved the day for me. Thanks.

  13. AJay says:

    Thanks!
    it worked!

  14. Gary says:

    Great! Exactly what i am looking for!

  15. Michael says:

    This is excellent. Thank you!

  16. nod says:

    Awesome tip!

  17. David says:

    Great tip :)

  18. Elliott Back says:

    Binary in, binary out.

  19. Fred says:

    Why do you need the /b flag twice?

Leave a Reply

Powered by WP Hashcash