* Check For Unlinked Media (FH7) - new plugin that can search in all locations

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

This draft plugin started life as part of my ongoing data audit as a quick alternative to Check for Unlinked Media that can search in all locations, not just the Project Media folder. However, it may be of more general interest, so was worth tidying up for sharing.

The original plugin has proven very popular over the years, but is limited to checking files in the Media folder. That makes sense historically, as this was the strongly preferred way of working back in the days of FH5. Later versions of FH have redressed this balance, and whether you link to external Media files or copy them into your project is now largely a matter of personal preference.

The plugin has a simple menu, as shown below. Just select where you want to search and how you want any unlinked files displayed (separate columns for file and folder, as per the default Records Window layout, or full file name and path, as per the original plugin).

Check For Unlinked Media (FH7).png
Check For Unlinked Media (FH7).png (10.17 KiB) Viewed 2169 times

All files with names starting with either a full stop or tilde character are ignored, as they are usually temporary or system files, as are all files with a .db extension.

There are gaps in the coverage of the original plugin, which does not support files with Unicode names, long file names, or multiple files per Media Record. I have fixed these omissions in this new version.

This plugin only lists unlinked files, and does not delete or move them. A plugin deleting files outside the current project is fraught with potential problems, and would probably be vetoed by the plugin police. It is strictly read-only, and makes no changes to your files or project, so is safe to use with any project. The final version will remember your menu selections between sessions.

The latest version can be downloaded using this link. It’s a simple plugin, so both the link and the draft versions will expire at the end of February. By then, it will either be in the Plugin Store or abandoned.

Does it work as expected? Any gaps in scope that could be reasonably added?
Last edited by Mark1834 on 30 Jan 2024 14:57, edited 1 time in total.
Mark Draper
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

Mark,

I ran the plugin and have an oddity.

With the Jane's plugin, I have no files listed as unlinked. With this plugin I have one.

image1.jpg
image1.jpg (26.8 KiB) Viewed 2135 times
image2.jpg
image2.jpg (25.48 KiB) Viewed 2135 times

Looking at this in the media window it shows it is linked once.

image3.jpg
image3.jpg (14.44 KiB) Viewed 2135 times

It is linked to a Source along with 16 other images in the same folder. See the next post for the screen print.

Thanks,
Bill
Bill Henshaw
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

Here is the other screenprint.

image4.jpg
image4.jpg (73.9 KiB) Viewed 2135 times

Bill
Bill Henshaw
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

Curious - what happens if you choose the Selected Folder option and navigate to that folder? Do you still see the unlinked file? Could you also select the Full File Path display option so we can see the full file path, please.

Can you also post the File Explorer view of that folder to confirm there are no additional files lurking there.
Mark Draper
User avatar
Valkrider
Megastar
Posts: 1571
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Valkrider »

Mark

Just FYI it installs and runs fine under Crossover on a Mac. Found a whole series of pages that I had forgotten to attach to a source. Thanks for writing it.
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by tatewise »

BillH wrote: 30 Jan 2024 02:54 Looking at this in the media window it shows it is linked once.
Just to clarify and avoid any misunderstanding, the Links 1 highlighted is the number of links to the Media record from other records (Source record in this case) and not the number of links to Media files.
So in this context the Links column is irrelevant.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
jelv
Megastar
Posts: 611
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by jelv »

Is it a case sensitive compare issue?

In the media list it is .JPG, the reported missing file is .jpg

Edit: Just tested that theory by changing the extension of a file in the sample project - that is the issue.
John Elvin
avatar
jelv
Megastar
Posts: 611
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by jelv »

Screen shots to illustrate:
Unlinked 1.png
Unlinked 1.png (7 KiB) Viewed 2029 times
Unlinked 2.png
Unlinked 2.png (13.14 KiB) Viewed 2029 times
Unlinked 3.png
Unlinked 3.png (5.02 KiB) Viewed 2029 times
BTW: The sample project had a genuine unlinked file!
John Elvin
avatar
jelv
Megastar
Posts: 611
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by jelv »

Just spotted what I believe is a windows oddity:

When I click the yellow circled arrow to open the file with the extension changed to upper case, the file name displayed at the top of the IrfanView window is the case that FH sent to windows i.e. lower case. Open it from Windows Explorer IrfanView show the upper case extension!
Oddity.png
Oddity.png (259.15 KiB) Viewed 2026 times
John Elvin
avatar
ColinMc
Superstar
Posts: 460
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by ColinMc »

Looks good Mark.

I ran the original plugin a few days ago and started linking the large number of files it reported.

Your new version working on an external folder gives me a few more - over 600 in total - (but I have added some more files, and so I don't have an exact compare with the old version unfortunately).

I've spot checked a few, and all looks valid.

Thanks for the plugin. Much appreciated.

Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by tatewise »

Regarding John's postings, I believe that Windows is case agnostic.
I've just changed a Media record filename similar to his illustrations to THE_MUNROS.JPG
FH is perfectly happy with that even though the actual filename is still The_Munros.jpg
However, this new plugin incorrectly lists it as unlinked whereas Jane's original correctly does not.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

Mark1834 wrote: 30 Jan 2024 10:23 Curious - what happens if you choose the Selected Folder option and navigate to that folder? Do you still see the unlinked file? Could you also select the Full File Path display option so we can see the full file path, please.

Can you also post the File Explorer view of that folder to confirm there are no additional files lurking there.
Hi Mark,

Yes, if I use the Selected Folder option that file still does appear on the result set.

Here is the Full File Path display.

file2.jpg
file2.jpg (18.57 KiB) Viewed 1948 times

Here is the File Explorer view of all files in that folder.

image1.jpg
image1.jpg (158.07 KiB) Viewed 1948 times

Interesting that only the file that is showing on the plugin result set has an extension of .jpg (lowercase) while all the others are .JPG (uppercase). Not sure if that indicates anything.

Bill
Bill Henshaw
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

tatewise wrote: 30 Jan 2024 11:40
BillH wrote: 30 Jan 2024 02:54 Looking at this in the media window it shows it is linked once.
Just to clarify and avoid any misunderstanding, the Links 1 highlighted is the number of links to the Media record from other records (Source record in this case) and not the number of links to Media files.
So in this context the Links column is irrelevant.
Thanks Mike.

I always get this confused.

Bill
Bill Henshaw
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

tatewise wrote: 30 Jan 2024 16:32 Regarding John's postings, I believe that Windows is case agnostic.
I've just changed a Media record filename similar to his illustrations to THE_MUNROS.JPG
FH is perfectly happy with that even though the actual filename is still The_Munros.jpg
However, this new plugin incorrectly lists it as unlinked whereas Jane's original correctly does not.
I am seeing similar if I look at the Media record. In the File Name it is listed as Register of Morgan's Chapel, Bunker Hill, West Virginia 1.JPG where as the file name is actually Register of Morgan's Chapel, Bunker Hill, West Virginia 1.jpg. If I change the name in the File Name field of the Media Record from JPG to jpg, the plugin doesn't report it.

Bill
Bill Henshaw
avatar
jelv
Megastar
Posts: 611
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by jelv »

tatewise wrote: 30 Jan 2024 16:32 Regarding John's postings, I believe that Windows is case agnostic.
I've just changed a Media record filename similar to his illustrations to THE_MUNROS.JPG
FH is perfectly happy with that even though the actual filename is still The_Munros.jpg
However, this new plugin incorrectly lists it as unlinked whereas Jane's original correctly does not.
One further point. If you copy The Munros.jpg and try to rename the copy to the same name but with different capitalisation e.g. THE_MUNROS.JPG, Windows objects.
John Elvin
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

Thanks folks, good spot. It still feels like an inconsistency that should be reported somewhere, although I agree that it’s not a linking error. JPG vs jpg is probably trivial, but a case difference in the actual filename may be significant, depending on the user’s filing system (e.g. Stoke-on-Trent.jpg vs Stoke-On-Trent.jpg).

Rightly or wrongly, the FH check of file links doesn’t spot case differences, so it’s probably best to keep the plugin consistent with the main application. I’ve therefore updated the master version to 0.2, which ignores file case. Download link at top of thread is unchanged.

The new process for FHUG plugins works well. It’s much easier for both author and users to keep a constant link pointing to a variable master copy, rather than faff about deleting old attachments and reposting new ones.🙂
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

On John’s point, you have to rename in two steps - say Munros.JPG to Munros.JP to Munros.jpg. We’re still living with dubious design decisions made over 40 years ago… :(
Mark Draper
User avatar
ColeValleyGirl
Megastar
Posts: 5510
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by ColeValleyGirl »

If it helps, by default Windows file names are not case sensitive.

However you can turn it on.. at your peril.

Case Sensitivity.
avatar
jelv
Megastar
Posts: 611
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by jelv »

Mark,

Going back to probably Windows 1.0 and DOS (i.e. 40 years), Abc.txt is the same file name as ABC.TXT - it's just the way the MS file system works so it doesn't need reporting.
John Elvin
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

Mark,

I ran the updated version and I get this error.

image.png
image.png (9.98 KiB) Viewed 1912 times

Bill
Bill Henshaw
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

Still looks fairly horrible to see jumbled up case though - long ago I expunged my system of upper case extensions, as they’re just wrong - but that’s probably just me - we all have our little foibles… :D
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

Oops :oops: Silly typo, fixed now.
Mark Draper
User avatar
BillH
Megastar
Posts: 2257
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by BillH »

Thanks Mark, that fixed it.

Nice plugin.

Bill
Bill Henshaw
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

No further issues have been raised, so I have updated the plugin to save selection options between sessions.

The link at the top of this thread downloads the updated prototype, and I will submit the final version to the Store before the set expiry date at month-end.
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2519
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Check For Unlinked Media (FH7) - new plugin that can search in all locations

Post by Mark1834 »

The plugin is now available in the Plugin Store. I will leave the link at the top of this thread in place, but it now points to the store version and expires automatically at the end of next week.

I noticed that Jane’s original plugin is shown as version 2.0, last updated in 2017, but the Version History and source code both say version 2.1, updated for FH7.
Mark Draper
Post Reply