OFX is an XML format for financial transaction history and many banks, including mine, provide the option to download your transaction data in this format. Unfortunately, they often force you to download a separate file for each statement. I would like to have one file for each of my accounts, rather than a bunch of file for each month.
So, are there any tools for taking multiple OFX files and merging them into one?
So, the first few answers have raised a few points of confusion. Let me clarify.
Not a text merge
OFX is an XML format. The XML has structure, and that structure is what needs to be merged. This is not a simple case of merging two text files.
Example: each OFX file has a field that specifies the ending balance, but you can't just stuff all the ending balances into the output file. You have to pick the most recent one. Ditto for the start date and end date.
Another example: each OFX file specifies an account (via account ID, bank ID, account type, etc.). It would be nice if the merge tool would refuse to merge OFX files unless they refer to the same account.
Most importantly, if the OFX files have overlapping date ranges, then some transactions may exist in multiple input files. These duplicate transactions must be deduplicated.
For example, suppose there are two input files. The first input file covers the months January through August. The second one covers the months July through December of the same year. In this case, any transactions in July and August will appear in both input files. When merging, these transactions need to be detected as duplicates, and only one instance of each should appear in the output.
Note that this sort of de-duplication is one of the main problems with QIF, and one of the main reasons that OFX was designed.