* Linked media files

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Linked media files

Post by SpencerDudeUK »

I link all my media files in lieu of copying them, and have now decided to change the location. To cut a long story short, I've always used 'One Drive', but that only gives 5Gb space free, and I'm runing out of space. Google Drive gives you 15Gb. I have copied all my files over and change the pointer to open the project from the new folder, but I see that all the media files are still pointed at the One Drive folders. Is there a 'global' change I can perform to point to the new folders on Google Drive - the structure is identical, it's just a matter of changing C:\Users\Chris\One Drive\.... to C:\Users\Chris\Google Drive\.... for every media file, or should I have done something differently in the migration process?
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

The Tools > External File Links dialogue has all the tools you need.
Click Help for advice, and a combination of Re-Map, Edit or Auto Repair Links will fix the links.
See how_to:changing_external_file_links|> Changing External File Links.

I think just select the OneDrive folder in the File Links and click Edit... to change it to Google Drive.

Presumably, you realise that if you kept your Media files within the Project then this problem would not arise.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

Yes, but I am assuming that would be yet another copy, and increase the project file size?
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

Only if you keep the original file outside the Project folder.

After I have copied a media file into the Project's Media folder, I delete the original.
If anything, that makes the Project a tiny bit smaller, because all the File Links are Media\... instead of C:\Users\Chris\Google Drive\...
That saves 22 characters, or 44 bytes in UTF-16 GEDCOM encoding, times the number of Media records.

The Media folder is simply a Windows folder just like any other, and can be organised into hierarchical sub-folders as you prefer. It just sits inside the Project folder structure on Google Drive instead of elsewhere.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

...so essentially, I could just 'Move' them instead of copying, then relink?
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

Yes, users have various techniques, and one involves moving media files into the Project's Media folder or a sub-folder and then adding the Media record which will link to the file without copying.

If you forget to add the media file to a record the Check for Unlinked Media Plugin will list them for you by comparing Media record links with Media folder files.

So if you wanted to adopt that structure now, just move all your media files from C:\Users\Chris\Google Drive\... into the Project's Media folder and in Tools > External File Links click Auto Repair Links which looks in the Media folder first, so very quickly adjusts all the links.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

I've done that, and it all looks OK, except for when it completed it said there were three broken links (out of over 6000) but didn't tell me what they were ... how do I find that out?
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

They were probably already broken before you started.

Try the Check for Unlinked Media Plugin to see what it lists.

In Tools > External File Links scan down the File Links and the broken links have a red cross instead of the usual yellow icon.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

I have gone down the list and can't find any with a red cross, and I've downloaded and installed the Plugin, but that just gives me a complete list of my media files greyed out...?
I must be having a really bad day, because I can't make any sense of that.
Also, in the 'External File Links' dialog box, as well as the correct path and links, it's still showing my previous paths crossed through. Can that be tidied up/deleted?
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

..on second thoughts, it seems to be showing me all the files currently not linked, rather than the ones not linked correctly...?
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

It sounds like you have NOT adjusted any of the links to point to the Project's Media folder.

Did you click Auto Repair Links and when prompted, save the changes?

The File Links should start with Project Data Folder - Media
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

FYI:
In the screenshot below the File Links with an X are broken links where that folder or file does not exist.
Once correctly linked into the Media folder they should look like the Project Data Folder - Media entries.
The attached Plugin is a way of listing the few broken links hidden amongst many valid links.
[ EDIT Plugin Attachment deleted as in Plugin Store ]

ExternalFileLinks.png
ExternalFileLinks.png (38.55 KiB) Viewed 8774 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

OK. I see the light!
It's not particularly intuitive, but I now see the logic. Thanks for all your input :)
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

...Now having sorted all that and copied all linked files into the project folder, my backup has jumped from 10mb to a whopping 2.4Gb!"! I deleted the cache files and backed up again, and still the same result - it's huge!
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

Yes, that is because the Project Backup now includes all the Media files as they are inside the Project.
Previously the backups did not include your external media files, so the backups are now more comprehensive.
However, since it is all on Google Drive anyway, FH Project backups are somewhat superfluous.
I just use the Windows backup tools to backup all my important files (not just FH) as well as keeping them in OneDrive.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
SpencerDudeUK
Diamond
Posts: 94
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Linked media files

Post by SpencerDudeUK »

OK. I guess I'm just too old school. If something happens to my google drive I will therefore lose everything. Since I have a NAS storage system I will continue to backup, but limit to weekly or monthly.
Thanks for all your help :)
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

Theoretically, if the online Google Drive or OneDrive fails, the copy on your PC (& NAS) should survive.
If your PC fails, the copy on Google Drive or OneDrive provides a backup copy.
(If you have a second PC then that provides yet another copy synched with Google Drive or OneDrive.)

Like you, I also backup weekly locally on a separate disk drive, but any common-mode risk such as fire, flood, theft, etc, may destroy all local copies, so the Google Drive or OneDrive copy provides a backup.
These local backups are for all sensitive data, not just FH, so the FH Backup command is rarely needed.

Remember that to protect against accidental mistakes, FH takes automatic Snapshots of the GEDCOM file.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
KiwiPeterHill
Diamond
Posts: 61
Joined: 08 Jun 2017 08:56
Family Historian: V7
Location: Waiuku, Auckland, New Zealand

Re: Linked media files

Post by KiwiPeterHill »

ok, I been following this and I am still a bit lost. I have a lot links to media that just doesn't exist anywhere on my computer. Mainly stuff from imported Gedcom files etc which referenced the Media but did not actually come to me with that Media.
How can I remove all these dead media links. Just make them gone and I will gather my own later.

regards Peter
User avatar
David2416
Superstar
Posts: 398
Joined: 12 Nov 2017 16:37
Family Historian: V7
Location: Suffolk UK

Re: Linked media files

Post by David2416 »

tatewise wrote: 08 May 2020 14:40
The attached Plugin is a way of listing the few broken links hidden amongst many valid links.
That is a really useful plugin, it's a pain having to search for the broken links amongst the rest. Although I usually find it amongst recently updated records!
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

When you import a GEDCOM file using File > Project Window > New Project, I am certain that it reports missing Media files that cannot be imported. That should be your prompt to investigate further, and not merge that GEDCOM into your master Project until resolved, along with all the other 'sanitisation' usually needed with imported data.

If you simply delete the Media records with the broken File Links then you may be throwing away useful information.
The Title of the record, its Date, its Note, its File name, and whatever other records links to the Media record may give you clues to finding the missing media document.
You could just delete the File links but a better solution may be to move the File name to the Note field as labelled text.
Then it won't be listed as a broken link, but a simple Query will easily list them for later investigation.

I could write a Plugin to provide that move File name to Note labelled text for selected Media records if you are interested.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
KiwiPeterHill
Diamond
Posts: 61
Joined: 08 Jun 2017 08:56
Family Historian: V7
Location: Waiuku, Auckland, New Zealand

Re: Linked media files

Post by KiwiPeterHill »

if you could do a plugin it be great, I have multilevel directories that FH is looking for media which doesn,t exist.
I know this is because when I first started on this road I was thinking I was a Smart AR as I had all these GEDcom files and all I had do is import them and start from there. I.E cheating by using someone elses hard work and research to advance my project.
Later in life this has come back to really bite me, with UID errors. Duplicated entries, Entries where the mother and father have died before the child was born and so the list goes on..... These Media files and their directory paths are just another punishment for cheating way back when....

I have REALLY learned the hard way.
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Linked media files

Post by tatewise »

Try the attached Check for Broken Media Links and Move to Notes Plugin Version 0.1 Date 10 May 2020.

You can either select the Media to be checked beforehand or the Plugin will prompt for selection.
It is, of course, easy to select every Media record if required.

Any broken link will result in the File: link field being deleted and some labelled text inserted into the Note: field with the label File: preceding the missing file path.

Those labelled text Note entries can easily be listed in various ways.
e.g.
A custom Query for Media records with a Rows filter for Exclude if =GetLabelledText(%OBJE._NOTE%,"File:") is null
In the Records Window, add a %OBJE._NOTE% column to the Media tab which can sort all File: entries toether.
Last edited by tatewise on 13 Jul 2023 11:10, edited 1 time in total.
Reason: Attachment Check for Broken Media Links and Move to Notes.fh_lua deleted ~ ask Mike Tate (tatewise) if you need a copy
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply