How to split and combine files

How do I split and combine files in Windows?

I need to split large files into several small sized files and then combine them after I transfer them to another box.

I'm fine with doing this on the command line.

1

8 Answers

I tend to compress the required file to a ZIP file, setting a maximum file size so that it gets split.

This means that you will always have the program to get the initial file back available.

5

If you just want to combine files (which have already been split somewhere else) you can do this in a Windows command prompt natively:

copy /b example.ext.001+example.ext.002+example.ext.003+example.ext.004 example.ext
2

Use HJSplit. It is simply the best.

HJSplit is freeware and portable (300 KB), and it doesn't have to be installed.

There is an older free command-line version of Goetz's File Splitter. You may like this version if you plan on running batch scripts to split lots of files.

7-Zip is another free open source program that allows you split (with or without compression) and combine files, either via GUI (right click on the file → Split File... → choose size) or command line.

If you have Total Commander, it does that as well (Files → Split File...)

3

For splitting files to exact sizes, you could always use the Linux / Unix command-line tool split. The Windows version is here:

Using the tool, you can split files to any size you would like, and you would use "cat" to recombine them.

For example:

split -b=10090000 bigfile.iso bigfile_part.

To split your files to exactly 10090000 bytes. Your output would look something like this:

bigfile_part.aa
bigfile_part.ab, etc.

To recombine, just do:

cat bigfile_part* > bigfile.iso
4

I've been using this:

type file1 file2 file3 > out
6

You can use WinRAR as a file splitter/joiner as well. To split a file into smaller files, select "Store" as the compression method and enter the desired value (bytes) into "Split to volumes" box. This way you can have split files named as filename.part1.rar, filename.part2.rar, etc.

You might want to use GSplit. It's a powerful and free file splitter that lets you split your large files into a set of smaller files called pieces.

0

In Cygwin (basic install), Bash shell:

dd if=archive.tar bs=512M | xz -e9fc | split -b4000m - /destination/path/archive_split.

Omit the xz pipe block if your archive is already compressed.

To splice your archive together:

cat archive_split.* > archive

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like