Read more articles
Compose a new article

How to recombine (join) split files (.001, .002...) into a single ZIP archive under Windows or OSX

Composed by: that-ben
On: 2019-02-11 12:54:25
Updated by: TechWizard2024
On: 2024-07-05 14:06:01
Other contributors: Saarek , makh , MattKC

Before you read any further: If your file does NOT EXACTLY END WITH .001, .002, etc... (e.g. ASD_3S152.001.dmg) then you need to jump to the split Disk Utility disk image section.

When you come across split files that end with sequential numbers (e.g. .001, .002, etc...), before you can use the file, you first need to join the split files together into a single, whole file.  A split ZIP file could look like this, for instance:

691-5088-A.zip_.001
691-5088-A.zip_.002
691-5088-A.zip_.003
691-5088-A.zip_.004

NOTE: this article will refer to a ZIP file but it obviously works on ANY type of file.  It doesn't matter if it's a ZIP or DMG or any kind of file, that is irrelevant.  It's just a split file.  It has nothing specific to do with ZIP.  You can think of "ZIP" here in this article as "A FILE". e.g. MyDiskImage.dmg.001 + MyDiskImage.dmg.002 will result in: MyDiskImage.dmg

Under Windows

Open a command prompt and navigate to the folder containing all the ZIP part files.  Once you're under that folder, adapt the following command (here based on the part files listed in example above) to your situation:

copy /B 691-5088-A.zip_.* 691-5088-A.zip

NOTE: Remember that ".zip" is only an example here. If your file is, e.g. a DMG, then it should end with ".dmg", not ".zip".

What this does is to create a combined file (copy) from all the ZIP parts and save it as 691-5088-A.zip which you can then expand normally.

Under Mac OS X or macOS

Once you have dowloaded all of the files move them to a folder of your choice. Right click on the folder you have created, choose get info and copy the file path from the 'Where' section.

Next open terminal and type in "CD" add a space and then paste in the path for the folder you made and hit enter. An example of the command is "CD /Users/david/Desktop/G3".

Next you need to need to run the command that merges the files together. An example of this command in full is "cat Guitar_Hero_III.zip_.* > G3.zip" The first part tells the computer that you want to concatenate a chain of files, the next part specifies what all of the files you want to merge start with and the final part is the name of the new zip file you want to create.

Once this process is complete you will have a new file in the folder you created which you can use in the usual manner.

 

NOTE: Remember that ".zip" is only an example here. If your file is, e.g. a DMG, then it should end with ".dmg", not ".zip".

Under Linux

Open a Terminal window and navigate to the folder containing all the ZIP part files.  Once you're under that folder, adapt the following command (here based on the part files listed in example above) to your situation:

cat 691-5088-A.zip_.* > 691-5088-A.zip

NOTE: Remember that ".zip" is only an example here. If your file is, e.g. a DMG, then it should end with ".dmg", not ".zip".

What this does is to combine (cat) all the files into a single file named 691-5088-A.zip which you can then expand normally.

Under classic Mac OS (9, 8 or 7)

Use ChunkJoiner.  Select all the .001, .002, .003, etc ZIP part files all at once then drag and drop the files selection onto the ChunkJoiner app icon and save the recombined output a file name.  If dragging and dropping files onto the app icon doesn't work, rebuild the desktop once before using this app so that the Finder knows that this app accepts all file types.

That's it :)

*Files ending with .001.dmg (not .dmg.001)

Files that do not exactly end with .001, .002, etc... such as ASD_3S152.001.dmg (it ends with .001.dmg) are NOT file parts and should not be joined together using commands such as "copy /B" under Windows or "cat" under Linux.  Those are split Disk Utility disk images.  You have to do this under OSX: put all files in the same folder (e.g. on your desktop) and double click the .001.dmg file.  Disk Utility will "assemble" the whole partition and mount it.  If you want it on an USB stick or a DVD-R, you can then do that using Disk Utility or any of your favorite DVD burner apps.

Support for segmented disk images has been deprecated under macOS Monterey – double-clicking on a segmented disk image results in an error dialog popping up saying "The disk image couldn't be opened. Failed to attach the disk image, error code 109"

The solution is to drop into Terminal and use hdiutil to join the segments together again. You can most easily do this by converting the disk image to a standard UDIF read-only image (UDRO) with the following command. You only need to give hdiutil the name of the first segment, and as long as the other segments are in the same directory, it will find them.

hdiutil convert Disk_Image.001.dmg -format UDRO -o Disk Image.dmg

This will take all the segments for Disk_Image.xxx.dmg and give you a single read-only disk image file called Disk Image.dmg. If you need a read/write image instead, use UDRW for the format. If you're restoring this image to a USB, then you'll need to make it UDRO format, and then scan it for restore with asr, e.g:

asr imagescan --source /path/to/Disk Image.dmg

This can then be restored with asr restore as follows:

sudo asr restore --source /path/to/Disk Image.dmg --target /Volumes/Target  --erase

Where Target is the name of the partition on the USB you wish to restore it to. Note that this will erase the entire partition before restoring the files. File-based restores haven't worked for quite some time now in macOS.