Page 1 of 1
Working With External File Links
Posted: 13 Mar 2016 10:59
by Johnyeates
Hallo, I am migrating my projects to another pc.
Is there a simple way, or PlugIn to check for any broken links? rather than scrolling through 20,000 odd media files/documents looking for 'X's, it is not a job I am looking forward to.
I have looked through the PlugIn list etc and was not able to locate anything suitable.
Regards
John Yeates
Re: Working With External File Links
Posted: 13 Mar 2016 11:06
by Johnyeates
Hi, me again, I have just re-checked the Plugin List and have found one called 'Check For Un-linked Media', is the Plugin I need to run?
John
Re: Working With External File Links
Posted: 13 Mar 2016 11:07
by Jane
Have you got 6.1 installed, if so you could try the "Auto Repair Links" on the External File Links option.
Re: Working With External File Links
Posted: 13 Mar 2016 14:30
by ronk
The Check for Unlinked Media looks at your media folders and lists any actual media that are not linked by or used in FH. For the unused or broken links in FH, you can check the Media tab in the Records Window. There is a column heading Links which you can click on to sort, and any such links will show up as '0' links.
I haven't yet had reason to try the 'auto-repair' function, but have used the Working with External File Links extensively to Re-Map my FH Media Records or links to subfolders of the Media folder. If the Media is not found, there will be an 'X' in the link name. I find Jane's plugin very powerful indeed and made migration to FH much easier.
With these tools my Media links and folders stays neat and tidy.
Ron
Win 7, FH 6.1.4
Re: Working With External File Links
Posted: 13 Mar 2016 16:09
by davidm_uk
If you do try the
Auto Repair Links make sure that you take a backup of at least your GEDCOM file (but if I were doing it I'd make a full project backup). You might find that the auto repair does things that you didn't expect and may have to correct.
Auto Repair Links help text says:
This button will prompt Family Historian to attempt to find missing media files and fix any 'broken' links. This can be a slow process, but a progress dialog is displayed so you can stop the search at any time if you wish. The search will begin with the current project folder, and ripple outwards from the current project, eventually including other fixed drives on your PC if necessary (and if there are any). The search will stop automatically when all missing files are found. As well as finding missing files, this function will also check if links to media files in the media subfolder of the project folder are setup as they should be, and will automatically fix the links if necessary.
Note that it may go trundling off around all of your disks looking for a file that might be the right one.
Re: Working With External File Links
Posted: 13 Mar 2016 19:59
by tatewise
Firstly, ronk is mistaken about the Links column. It counts how many other Records link to the Media Record, NOT whether the Media Record links to its file.
See fhugdownloads:contents:multimediafilelinks|> Query and Spreadsheet: Multimedia File Links that can list all broken links, also the Check and Repair Media Links Plugin will list broken links and other anomalies, with the option to repair.
Re: Working With External File Links
Posted: 13 Mar 2016 20:34
by ronk
Mike,

Thanks for pointing out my misstatement and I think in practice I knew this was to other records, since it makes no sense to have more than 1 link counted to an actual media file but does to other FH records.
However, I had thought that if
Check for Unlinked Media finds nothing it means all media files are being used by FH. But that any media record with '0' links could be deleted, since it is not being used by FH. Assume you're saying the link count is incremented only when a media record is created by adding it to an individual or family,etc? And if an individual or family link is deleted, then the count decrements.
Maybe my house isn't as tidy as I thought. Will look over your reference material.
Ron
Re: Working With External File Links
Posted: 13 Mar 2016 21:25
by ronk
Mike,
See Knowledge Base > Query and Spreadsheet: Multimedia File Links that can list all broken links.
Followed your suggestion and downloaded the macro/spreadsheet/query procedure. I have 3149 media links, and for some reason the macro stopped after 1999 rows, all links were OK=Yes. Any ideas why it stopped? I did it successfully in two chunks, with the second one being 1149 links, and they were all tested OK as well. (so I guess my house is tidy after all)
A nice procedure put in my toolbox.
So just to make sure I understand...if you have unlinked all links to a media record, but not the media record itself, and the media file still exists, the
Check for Unlinked Media will still not list it, since FH still has the media record. However, if one deletes the '0' link media record, the media file will now be listed by the
Check for Unlinked Media as unused by FH. Do I have that right?
Ron
Re: Working With External File Links
Posted: 13 Mar 2016 21:50
by tatewise
Ron, your understanding is correct for the Check for Unlinked Media Plugin and the Links count in Records Window.
If the Plugin lists nothing, then every file in the Media folder/sub-folders is coupled to a Media Record.
If the Links count is 0 on any record in any Records Window tab, then that record is not referenced by any other record, so is redundant and can safely be deleted. Yes, the Links count is incremented whenever a link is created by whatever method, and is decremented whenever a link is removed.
Re: Working With External File Links
Posted: 13 Mar 2016 23:17
by ronk
Thanks, glad I finally got it right.
What about the
Query and Spreadsheet: Multimedia File Links range issue? I tried twice with the same result. I don't know VBasic but viewed the macro and didn't see a range other than the sort range A1:C9999. At initial load, the Column A is not getting a formula loaded beyond cell A1999. If I manually copy it to the higher range cells, the macro executes fine. Looks like some sort of dimension issue. Curious to know what you find out.
Followed your suggestion and downloaded the macro/spreadsheet/query procedure. I have 3149 media links, and for some reason the macro stopped after 1999 rows, all links were OK=Yes. Any ideas why it stopped? I did it successfully in two chunks, with the second one being 1149 links, and they were all tested OK as well.
Ron
Excel 2007, Win7, FH6.1.4
Re: Working With External File Links
Posted: 14 Mar 2016 10:53
by tatewise
Your analysis is correct. The spreadsheet only puts the formula in the first 1999 rows and if copied beyond that will work thereafter. The downloaded spreadsheet has to have a finite size, but I suppose the macro could detect the last cell in columns B & C and copy the formula down column A to match.
Re: Working With External File Links
Posted: 14 Mar 2016 13:00
by ronk
I am OK with leaving the code as is. I suppose a note could put in the instruction for use. Most who use the procedure will likely know enough about Excel already. The user has to do put in some effort too you know.

Thanks again for making the procedure available. It gave me confidence my links are in good order.
Ron
Re: Working With External File Links
Posted: 14 Mar 2016 15:01
by Johnyeates
Thanks for all your comments, very useful they will take some time to digest.
John
Re: Working With External File Links
Posted: 14 Mar 2016 15:29
by PeterR
John, have you also digested all of how_to:family_historian_migration_guide|– Family Historian V5 & V6 Migration Guide?