Update Media Paths #media #paths #multimediatable

I have recently added a new drive to my pc and wanted a quick way to update the media path file. Whilst there is standard tool within RM5 to fix broken media links, it searches through my entire pc which now has 5TB of data – it picks up files from backup directories and generally takes a long time. I also have the option to update the path directly in the MultimediaTable. Some examples below:

  • I want to review the records with a particular path
SELECT *
FROM MultimediaTable
WHERE Mediapath like ('JFAMILY_HISTORYPAXTONCERT%');
  • I want to update this path to the new path

 

UPDATE  multimediatable
SET Mediapath = 'S:New_Family_HistoryPAXTONCERT')
WHERE mediapath LIKE ('JFAMILY_HISTORYPAXTONCERT%');

 

  • If i want to replace only some of the path and not the entire string i use the REPLACE function

 

UPDATE  multimediatable
SET Mediapath = REPLACE (Mediapath, 'JFAMILY_HISTORY', 'S:New_Family_History')
WHERE mediapath LIKE ('JFAMILY_HISTORYPAXTONCERT%');

Cheers,

Sean

Discussions & comments from Wikispaces site


ve3meo

Inline comment: “a quick way to update the media path file”

ve3meo
04 September 2018 03:34:47

ve3meo Jan 12, 2012

Good examples of Search, Update and Replace. Also see the page Search & Replace for more examples. Of course, RootsMagic own Search & Replace function on “Multimedia filenames” in the “Field to search” selection does much the same, with the ability to confirm each replace.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.