How merge multiple files into a file

Doubts, help and support about QuickBMS and other game research tools
lm160
Posts: 2
Joined: Tue Oct 13, 2015 12:35 pm

How merge multiple files into a file

Post by lm160 »

For example:
1.bin - >
2.bin - > new.bin
3.bin - >
I want to merge these three files into one file, and I know it can be combined with "get TMP long" and "put TMP long" to combine these three files to a file.But in fact, I'm going to merge a lot of files, and the OFFSET and SIZE of each file is recorded in another file. If it is in accordance with the above order, the efficiency is too slow.

Is there a direct command to write a file to a new file?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: How merge multiple files into a file

Post by aluigi »

The basic steps to do that are:

Code: Select all

get SIZE asize  # takes the size of the current file
append # enable the append mode for concatenating them
log "new.bin" 0 SIZE
append # disable concatenation (not necessary if its there are no other operations)

With those few lines you have a script that you can use on all the files you want to concatenate.
For example when you launch quickbms with double-click, select this script, then select all the files you want to concatenate and then the output folder.
It should work very well, try it.

Otherwise I have a command-line tool called bincat.
lm160
Posts: 2
Joined: Tue Oct 13, 2015 12:35 pm

Re: How merge multiple files into a file

Post by lm160 »

aluigi wrote:The basic steps to do that are:

Code: Select all

get SIZE asize  # takes the size of the current file
append # enable the append mode for concatenating them
log "new.bin" 0 SIZE
append # disable concatenation (not necessary if its there are no other operations)

With those few lines you have a script that you can use on all the files you want to concatenate.
For example when you launch quickbms with double-click, select this script, then select all the files you want to concatenate and then the output folder.
It should work very well, try it.

Otherwise I have a command-line tool called bincat.


Woo~ thanks, in packing,
look like fast than before.