* Check and Repair Media Links
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Check and Repair Media Links
Following a recent spate of users with Media Link problems, particularly after moving from PC to PC or importing from other software, I tried using the Check and Repair Media Links Plugin to see if it could help.
When the Plugin detects File Not Found it offers to find and move the missing file(s).
(1) It is not obvious that Browse For Folder prompt to Please select destination directory is actually asking for a source directory to restrict the search for the missing files.
(2) When a file is found, the Plugin does not offer to copy/move it to the path in the original Multimedia Record.
Instead it asks the user to Please select destination directory and filename path, and changes original Multimedia Record to this path.
Thus when moving from PC to PC, it does not make it easy to copy/move the files to match their Multimedia Records.
If it offered the original Multimedia Record path, then this would be a one click Yes option, and only if No was chosen would the path dialogue be needed.
(3) If that Please select destination directory and filename dialogue is Cancelled the Plugin reports an error at line 320: bad argument #1 to 'open' (string expected, got nil).
(4) When any file above is copied its Date modified and Date Accessed are swapped around, because the lfs.touch() arguments are the wrong way round.
ID:6985
When the Plugin detects File Not Found it offers to find and move the missing file(s).
(1) It is not obvious that Browse For Folder prompt to Please select destination directory is actually asking for a source directory to restrict the search for the missing files.
(2) When a file is found, the Plugin does not offer to copy/move it to the path in the original Multimedia Record.
Instead it asks the user to Please select destination directory and filename path, and changes original Multimedia Record to this path.
Thus when moving from PC to PC, it does not make it easy to copy/move the files to match their Multimedia Records.
If it offered the original Multimedia Record path, then this would be a one click Yes option, and only if No was chosen would the path dialogue be needed.
(3) If that Please select destination directory and filename dialogue is Cancelled the Plugin reports an error at line 320: bad argument #1 to 'open' (string expected, got nil).
(4) When any file above is copied its Date modified and Date Accessed are swapped around, because the lfs.touch() arguments are the wrong way round.
ID:6985
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Check and Repair Media Links
I have updated the Plugin to correct the above problems, and a few others.
A candidate V1.1 is on SkyDrive Check and Repair Media Links - double-click popup to install.
[The above link is 'dead' because an updated Plugin version is now in the Plugin Store as was its predecessor version.]
For each 'File Not Found' it offers:
(1) To update Media Record path to match candidate file, but only if file is in the Project Media folder.
(2) To copy candidate file to match current Media Record path.
(3) To copy candidate file into Project Media folder chosen by user and update Media Record path.
It would be useful to combine the above options into one dialogue, and add an option to apply the chosen option to the rest of the files.
Then if all filenames are unique, the options (1) & (2) would automatically run to completion.
This would make alignment of Media Records and Media Files simple after either copying from PC to PC or after re-organising media into sub-folders using just Windows Explorer or just Work with External File Links.
A candidate V1.1 is on SkyDrive Check and Repair Media Links - double-click popup to install.
[The above link is 'dead' because an updated Plugin version is now in the Plugin Store as was its predecessor version.]
For each 'File Not Found' it offers:
(1) To update Media Record path to match candidate file, but only if file is in the Project Media folder.
(2) To copy candidate file to match current Media Record path.
(3) To copy candidate file into Project Media folder chosen by user and update Media Record path.
It would be useful to combine the above options into one dialogue, and add an option to apply the chosen option to the rest of the files.
Then if all filenames are unique, the options (1) & (2) would automatically run to completion.
This would make alignment of Media Records and Media Files simple after either copying from PC to PC or after re-organising media into sub-folders using just Windows Explorer or just Work with External File Links.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8514
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Check and Repair Media Links
Thanks Mike, I am busy with other things at the moment.
If you would like to take the plugin on, I can get Calico to move it over to you so it get's added to your plug ins on the store.
If you would like to take the plugin on, I can get Calico to move it over to you so it get's added to your plug ins on the store.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Check and Repair Media Links
OK, I'm happy for you to do that Jane [grin]
The SkyDrive link above has a working V1.1 if anyone would like to try it.
But ensure you have a Project Backup just in case anything goes awry.
You can always revert to V1.0 from the Plugin Store.
The SkyDrive link above has a working V1.1 if anyone would like to try it.
But ensure you have a Project Backup just in case anything goes awry.
You can always revert to V1.0 from the Plugin Store.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Check and Repair Media Links
Jane, has the process of transferring this Plugin to me, as you offered over a month ago, run into problems with Calico Pie, or just been overlooked?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8514
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Check and Repair Media Links
I'll send them another note. Can you check it tomorrow afternoon and if not give me a shout.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
-
- Diamond
- Posts: 68
- Joined: 27 Apr 2015 21:12
- Family Historian: V6.2
- Location: Wolverhampton, UK
- Contact:
Re: Check and Repair Media Links
I am a late arrival to this one...
This looks like it may be a useful plugin. However, not only does Mike's Skydrive hyperlink lead nowhere, the entry in the KnowledgeBase Family Historian Plugins Alphabetic Index is more or less a "dead" link too. I wonder, was this plugin superseded by another one, or just forgotten? Enticingly, the link to a Help video does work!
This looks like it may be a useful plugin. However, not only does Mike's Skydrive hyperlink lead nowhere, the entry in the KnowledgeBase Family Historian Plugins Alphabetic Index is more or less a "dead" link too. I wonder, was this plugin superseded by another one, or just forgotten? Enticingly, the link to a Help video does work!
Re: Check and Repair Media Links
Nigel,
The Plugin was updated and is in the Family Historian Plugin Store: http://www.family-historian.co.uk/plugi ... try?id=277
Mervyn
The Plugin was updated and is in the Family Historian Plugin Store: http://www.family-historian.co.uk/plugi ... try?id=277
Mervyn
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
However, the Plugin is now largely redundant, because FH V6 has added link repair features to both Tools > External File Links and the Media Window.
The planned evolution of the Plugin has stalled, due to the above features, and a few remnants, such as the KB page perhaps need cleaning up.
The planned evolution of the Plugin has stalled, due to the above features, and a few remnants, such as the KB page perhaps need cleaning up.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Diamond
- Posts: 68
- Joined: 27 Apr 2015 21:12
- Family Historian: V6.2
- Location: Wolverhampton, UK
- Contact:
Re: Check and Repair Media Links
Thanks for the update. I have taken a look at it, and it is not for me because I keep my FH multimedia files outside the FH Projects folder.
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
Nigel, what is your rationale for keeping FH multimedia files outside the FH Projects folder?
There are complications when it comes to moving Projects or FH from PC to PC, unless you take certain precautions.
I remember discussing this with some users, but possibly not you, and it is important to understand the options and risks.
There are complications when it comes to moving Projects or FH from PC to PC, unless you take certain precautions.
I remember discussing this with some users, but possibly not you, and it is important to understand the options and risks.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
I have the opposite to Nigel's setup - I create Media in subfolders within the Media folder. Such as Media/Census and Media/Baptism, etc.
This is a legitimate setup allowed by AS.
The Plug-In doesn't allow for this...
BR
David
I have the opposite to Nigel's setup - I create Media in subfolders within the Media folder. Such as Media/Census and Media/Baptism, etc.
This is a legitimate setup allowed by AS.
The Plug-In doesn't allow for this...
BR
David
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
David, what makes you say that, as I think the Plugin supports all Media sub-folders?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
No - I didn't say or infer that. I said the Plug-In does not support this. I used it this morning and it found 480 records missing - due I suspect to these media records existing in sub folders below the Media folder.
David
No - I didn't say or infer that. I said the Plug-In does not support this. I used it this morning and it found 480 records missing - due I suspect to these media records existing in sub folders below the Media folder.
David
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
David, to confirm my memory was not failing me, I have run Check and Repair Media Links Version 1.1 Date 17 December 2014 on several Projects with many Media sub-folders, and no unexpected problems were reported.
If the Plugin reports problems, I advise you investigate them first by using Tools > External File Links.
If there are any broken file links then they will be marked with an X.
If there are absolute paths instead of relative paths then they will start with a drive letter such as C: - Users, etc. Those need to be corrected to relative paths starting with Project Data Folder - Media so your Projects will migrate to another PC without breaking the links. The Plugin will make those corrections automatically.
The Plugin will try to make the necessary missing file link corrections semi-automatically.
Alternatively, use the Tools > External File Links button Auto Repair Links.
If the Plugin reports problems, I advise you investigate them first by using Tools > External File Links.
If there are any broken file links then they will be marked with an X.
If there are absolute paths instead of relative paths then they will start with a drive letter such as C: - Users, etc. Those need to be corrected to relative paths starting with Project Data Folder - Media so your Projects will migrate to another PC without breaking the links. The Plugin will make those corrections automatically.
The Plugin will try to make the necessary missing file link corrections semi-automatically.
Alternatively, use the Tools > External File Links button Auto Repair Links.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
Okay - I understand this a little better now. When I use the Auto Repair Link from within Tools External File Links. I get the message No Bad Links Found. So all must be good. And I see Project Data Folder in my Media Path.
I got confused earlier as the Plug-in reported 480 records with the Error 'File is not in Media Folder'. So do I have a problem or not? Or should I ignore the Plug-In and it's Output?
BR
David
Okay - I understand this a little better now. When I use the Auto Repair Link from within Tools External File Links. I get the message No Bad Links Found. So all must be good. And I see Project Data Folder in my Media Path.
I got confused earlier as the Plug-in reported 480 records with the Error 'File is not in Media Folder'. So do I have a problem or not? Or should I ignore the Plug-In and it's Output?
BR
David
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
OK, so you run the Plugin, and when it asks to fix the 480 problems you answer No.
The Plugin produces a Result Set with 480 rows that in the 3rd Problem column says File not in Media folder.
What does it say in the 2nd File column for each entry?
That is the path in your Media Record that links to the image file.
The Plugin is claiming that path lies outside your Project's Media folder.
Double-click on 1st Media Object item to open the Media Record Property Box.
If the path is on a Network such as \\XYZ\ it appears in Tools > External File Links after all Project Data Folder entries.
So you must scroll down to the end to see those Network entries.
In this scenario the file links are not actually broken, so Auto Repair Links has nothing to repair.
If my analysis above is correct, then you are mistaken in thinking all your image files are within the Media sub-folder using a Project Data Folder relative path.
Some of them are using a Network path, although that may resolve to a folder within the Project's Media folder.
There are alternative ways of correcting this situation, depending on the details, assuming you wish to do so.
The Plugin produces a Result Set with 480 rows that in the 3rd Problem column says File not in Media folder.
What does it say in the 2nd File column for each entry?
That is the path in your Media Record that links to the image file.
The Plugin is claiming that path lies outside your Project's Media folder.
Double-click on 1st Media Object item to open the Media Record Property Box.
If the path is on a Network such as \\XYZ\ it appears in Tools > External File Links after all Project Data Folder entries.
So you must scroll down to the end to see those Network entries.
In this scenario the file links are not actually broken, so Auto Repair Links has nothing to repair.
If my analysis above is correct, then you are mistaken in thinking all your image files are within the Media sub-folder using a Project Data Folder relative path.
Some of them are using a Network path, although that may resolve to a folder within the Project's Media folder.
There are alternative ways of correcting this situation, depending on the details, assuming you wish to do so.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
The second column reports paths such as 'media\Baptism\Baptism blah blah' or 'media\Birth\Birth blah blah'
See screen shot > Capture.
Double clicking the first record shows this > See screen shot Capture1
A view in External File Links shows this > See screen shot Capture2. There are no Network paths. All media subfolders appear here in the same Indented fashion.
So I'm not sure If I actually have a problem or not...
BR
David
The second column reports paths such as 'media\Baptism\Baptism blah blah' or 'media\Birth\Birth blah blah'
See screen shot > Capture.
Double clicking the first record shows this > See screen shot Capture1
A view in External File Links shows this > See screen shot Capture2. There are no Network paths. All media subfolders appear here in the same Indented fashion.
So I'm not sure If I actually have a problem or not...
BR
David
- Attachments
-
- Capture2.JPG (130.32 KiB) Viewed 14672 times
-
- Capture1.JPG (103.94 KiB) Viewed 14672 times
-
- Capture.JPG (213.55 KiB) Viewed 14672 times
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
Capture3 shown here is my Windows 10 Folder structure.
BR
David
Capture3 shown here is my Windows 10 Folder structure.
BR
David
- Attachments
-
- Capture3.JPG (62.92 KiB) Viewed 14672 times
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
David, I can see what is the problem.
The actual Project Media folder has a capital M.
Some, or maybe all, your Media record File Links start with media with a small m.
That is not a problem for FH and Windows but the Plugin is only checking for Media with a capital M. So it mistakenly thinks the file path is not in the Media folder. That is a minor bug in the Plugin that could be fixed in due course, but as I said it has almost become redundant.
You can either live with the situation, or change all the media into Media.
The change is quite easy in Tools > External File Links but needs two steps:-
Select the media folder and click Edit and change Folder Name to Median (yes Median with trailing n.)
All File Links will be marked with X, but just click Edit again and change Folder Name to Media.
Then all links will be OK and Plugin will not complain.
The actual Project Media folder has a capital M.
Some, or maybe all, your Media record File Links start with media with a small m.
That is not a problem for FH and Windows but the Plugin is only checking for Media with a capital M. So it mistakenly thinks the file path is not in the Media folder. That is a minor bug in the Plugin that could be fixed in due course, but as I said it has almost become redundant.
You can either live with the situation, or change all the media into Media.
The change is quite easy in Tools > External File Links but needs two steps:-
Select the media folder and click Edit and change Folder Name to Median (yes Median with trailing n.)
All File Links will be marked with X, but just click Edit again and change Folder Name to Media.
Then all links will be OK and Plugin will not complain.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Megastar
- Posts: 1010
- Joined: 22 Jun 2016 15:54
- Family Historian: V7
- Location: United Kingdom
Re: Check and Repair Media Links
Hi Mike
Spot On as usual and Good Catch. That solved the problem. The Plug-In now states no problems found after changing media to Media
BR
David
Spot On as usual and Good Catch. That solved the problem. The Plug-In now states no problems found after changing media to Media
BR
David
-
- Gold
- Posts: 18
- Joined: 30 Mar 2015 16:01
- Family Historian: V6
- Location: Bury St Edmunds, SUFFOLK
Re: Check and Repair Media Links
I have been reading this discussion on media links and realize that I made a dreadful error in doing what David Potter did, namely link my media to a folder outside of FH6. I understand that this will cause unnecessary complications when it comes to transferring my FH Projects to a new PC, which will inevitably happen at some point in the future. My reason for selecting this method, apart from my ignorance at the time as to the complications, was to avoid the drain on the hard drive of having two copies of the same media taking up space.
Is there an easy(ish) way to correct this "error" or is it a case of unlinking each one and then relinking, using the alternative option of making a copy within the project?
Is there an easy(ish) way to correct this "error" or is it a case of unlinking each one and then relinking, using the alternative option of making a copy within the project?
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
The solution is usually quite straightforward.
Let's assume all your external media files are within the C:\User\...\XYZ folder or sub-folders and are all linked to FH.
You project will use the C:\User\...\Documents\Family Historian Projects\YourProject\YourProject.fh_data\Media folder.
That assumes you are using the default Project Location and your project is named YourProject.
Use Windows File Explorer to Move (NOT Copy) the entire XYZ folder contents to the Media folder.
Then in FH use Tools > External File Links and click Auto Repair Links button.
That should remove all the X marks against each file.
The list should start Project Data Folder - Media and NOT mention the C: drive or any other drive.
If any of the above assumptions are incorrect, then tell us about your scenario before doing anything.
For example there may be other files in that XYZ folder not linked to FH.
You may have completely different path names than the examples above.
Tell us your path names so we can give explicit commands to use.
Let's assume all your external media files are within the C:\User\...\XYZ folder or sub-folders and are all linked to FH.
You project will use the C:\User\...\Documents\Family Historian Projects\YourProject\YourProject.fh_data\Media folder.
That assumes you are using the default Project Location and your project is named YourProject.
Use Windows File Explorer to Move (NOT Copy) the entire XYZ folder contents to the Media folder.
Then in FH use Tools > External File Links and click Auto Repair Links button.
That should remove all the X marks against each file.
The list should start Project Data Folder - Media and NOT mention the C: drive or any other drive.
If any of the above assumptions are incorrect, then tell us about your scenario before doing anything.
For example there may be other files in that XYZ folder not linked to FH.
You may have completely different path names than the examples above.
Tell us your path names so we can give explicit commands to use.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Gold
- Posts: 18
- Joined: 30 Mar 2015 16:01
- Family Historian: V6
- Location: Bury St Edmunds, SUFFOLK
Re: Check and Repair Media Links
It looks like I didn't reply and thank you, Mike, for sorting out this problem 4+ years ago!! Humble apologies for that. Fast-forward to the present, and I switched to a Mac some 18 months ago and migrated FH6 to that using Crossover. It has worked satisfactorily, but Crossover does not work well with all Windows apps. I recently took the difficult decision to partition my drive and install Windows directly on the Mac. FH6 has come over to that partition very well, and I certainly feel more comfortable using it in its native OS. I do have one minor issue with missing media links. Having run the auto repair process, it successfully re-linked all the media links, bar three. Apologies if I'm missing the blindingly obvious, but how do I identify which media item or items are missing? I went back to the Mac side of the partition and discovered that the same 3 links are missing there, so it's not a new problem, just one that I haven't discovered until now.
One other strange anomaly relates to the display. When launching FH6 in Windows 10, the start screen with the FH version details that appears briefly, is really tiny. Likewise, the icons on the left side vertical toolbar (by default, links to focus and records windows) are also really tiny. Everything else renders as I would expect, and I wondered whether there is any obvious reason for these anomalies?
One other strange anomaly relates to the display. When launching FH6 in Windows 10, the start screen with the FH version details that appears briefly, is really tiny. Likewise, the icons on the left side vertical toolbar (by default, links to focus and records windows) are also really tiny. Everything else renders as I would expect, and I wondered whether there is any obvious reason for these anomalies?
- tatewise
- Megastar
- Posts: 28410
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check and Repair Media Links
In FH V7 to show missing links the Tools > External File Links... dialogue has a Show Broken Links Only option.
In FH V6 you have to scan through the File LInks to spot the three X marks that replace the media icon.
Alternatively, open the Media Window and set the Media List: droplist option to New/Unlinked Media.
I'm not sure what would cause the vertical Navigation Bar icons to be so small, especially if the horizontal toolbars are OK.
In FH V6 you have to scan through the File LInks to spot the three X marks that replace the media icon.
Alternatively, open the Media Window and set the Media List: droplist option to New/Unlinked Media.
I'm not sure what would cause the vertical Navigation Bar icons to be so small, especially if the horizontal toolbars are OK.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry