I'm looking for a command line tool that works on Windows to merge large binary files. I would use it in a scenario like this: utorrent has created a file on one computer and filled it partially with downloaded segments. The rest is filled with nulls. I have another partial download of the same file, and this file is not necessarily of the same size as the first one, and might have been downloaded either sequentially, from a server, or using utorrent as well. In any case, the files should be considered from beginning to end, byte by byte, so length does not matter. If file a has data where file b has nulls , nulls in b should be replaced. It doesn't matter whether the result is output to one of the original files or to a newly created file.