Directory Patch Files

A typical case for distributing a software package is patching complete directories or even whole directory structures.

BinPatch does a big deal to analyse the directories for similar files detecting even renamed files, detecting obsolete files and new files that cannot be built by a patching process.

But this is transparent to you as the user. Just give the path of the directories, one for a start state and one for the end state and the patch file will be generated by GenPatch like you learned above with single file patches. You might want to learn about the "Autodetection of best matching source files" that GenPatch performs with directories. Many options for you to be able to control the operation, but most often you need not use them at all.

When applying the patch file there is no difference compared to working with files, just that a backup is done by default (which you can disable with BinPatch Version 3.1 and higher)  so that replaced files and not deleted and could be restored in case of a problem.

Note that the DoPatch processing of directory patch files is designed to make a full rollback in the event of any kind of problem. This includes disk full situations, file access problems or whatever problem there may be. This will ensure that patch files won't leave the end user in between of two version with nothing working anymore, but instead revert to the previously existing version automatically.