Click here to Skip to main content
15,885,365 members
Articles / Operating Systems / Windows
Tip/Trick

Joining Binary Files from a bat File Without Extra Programs

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
11 Sep 2013CPOL 29.2K   1   7
How to join binary files without extra software

Introduction

Probably you will have received a set of files that are separated/split (like when you have multiple volumes in a ZIP or RAR file) but that have not been generated through a compression tool.

In those cases, usually the sender recommends to use HJSplit to join those files.

Here you will find a simple batch file sample on how to do that without any program. Simply form the CMD.

Using the Code

As you will see, this is only a special syntax for the copy command in Windows.

In that case, you will take advantage of the /B modifier which indicates copy that the file is binary.

Also, you will use the + sign to join files:

copy filename.iso.001 /B + filename.iso.002 /B filename.iso /B

pause

After executing the previous snippet, you'll get a new file named "filename.iso" which will be the addition of two binary files filename.iso.001 and filename.iso.002.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer robotecnik
Spain Spain
I'm from Catalonia (in Spain) and a specialist in CNC, PLC, robotics and automation in general.

From 1998 I've been developing software applications for the automation market.

I'm using different technologies in each case to get the proper result, fieldbus communications, special electronics, special laser sensors, artificial vision, robot arms, CNC applications, PLC's...

www.robotecnik.com[^] - robots, CNC and PLC programming

Comments and Discussions

 
GeneralMy vote of 5 Pin
Konstantin Taranov17-Sep-13 5:33
professionalKonstantin Taranov17-Sep-13 5:33 
GeneralRe: My vote of 5 Pin
Joan M17-Sep-13 5:46
professionalJoan M17-Sep-13 5:46 
QuestionHas this been there right from good old DOS days? Pin
TinyDevices11-Sep-13 23:31
professionalTinyDevices11-Sep-13 23:31 
AnswerMessage Closed Pin
12-Sep-13 0:44
professionalJoan M12-Sep-13 0:44 
GeneralRe: Has this been there right from good old DOS days? Pin
TinyDevices12-Sep-13 1:17
professionalTinyDevices12-Sep-13 1:17 
GeneralRe: Has this been there right from good old DOS days? Pin
Joan M12-Sep-13 1:32
professionalJoan M12-Sep-13 1:32 
AnswerRe: Has this been there right from good old DOS days? Pin
Joan M31-Jan-17 6:49
professionalJoan M31-Jan-17 6:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.