Media+-+Preserve+Captions+et+al+from+RM4+to+RM5

RootsMagic 4 supported a unique set of metadata (Caption, Description, Date, SortDate, RefNumber) for each use of a media file, i.e., if the same image file was used for a citation, a fact and a person, there were three sets of metadata. RootsMagic 5 does not permit that, allowing only one set of metadata per file. When a RM4 database is updated to RM5, only one of those three sets of metadata survive.

This series of queries and related Windows commands revises a RM4 database and makes copies of the multiply-linked files so that the update to RM5 will preserve all the metadata.

It creates a temporary table in the RootsMagic 4 database named MultiLinkMediaDupe:


 * ~ LinkID ||~ MediaID ||~ MediaType ||~ MediaPath ||~ MediaFile ||~ URL ||~ Thumbnail ||
 * 103 || 96 || 1 || C:\MyDocs\FamilyTree\Holden-Cudworth_Wilson-Wason\Scrapbook\Hendry\ || Hendry, Alex - grave.jpg ||  || Blob ||
 * 143 || 96 || 1 || C:\MyDocs\FamilyTree\Holden-Cudworth_Wilson-Wason\Scrapbook\Hendry\ || Hendry, Alex - grave.jpg ||  || Blob ||

Inserts new records into the MultiMediaTable to point to future unique copies of the multi-linked image file (the duplicate shown below is prefixed by the LinkID to make it unique):
 * ~ MediaID ||~ MediaType ||~ MediaPath ||~ MediaFile ||~ URL ||~ Thumbnail ||
 * 134 || 1 || C:\MyDocs\FamilyTree\Holden-Cudworth_Wilson-Wason\Scrapbook\Hendry\ || 103-Hendry, Alex - grave.jpg ||  || Blob ||

Generates a bunch of SQL statements (one example shown) that you copy and execute to update the MediaLInkTable to point to the new unique copy of the media file from the link which holds the metadata:
 * ~ --SQL ||
 * UPDATE MediaLinkTable SET MediaID=134 WHERE LinkID=103 ; ||

Generates a set of Windows commands (batch) that you copy to a .cmd or .bat file and run to make unique copies of the media files:
 * ~ REM Make unique copies of multi-linked RM4 media files ||
 * COPY "C:\MyDocs\FamilyTree\Holden-Cudworth_Wilson-Wason\Scrapbook\Hendry\Hendry, Alex - grave.jpg" "C:\MyDocs\FamilyTree\Holden-Cudworth_Wilson-Wason\Scrapbook\Hendry\103-Hendry, Alex - grave.jpg" ||

When completed, the Media Gallery will have more items, all beginning with a number, followed by a hyphen, before the original file name. From there, you can check a few to confirm that they are used by the expected source, fact or person. If you're happy, then you can safely upgrade to RM5 without fear of losing your custom captions.