* Filenames of Photos

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
avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Filenames of Photos

Post by peterbel » 16 Dec 2020 16:57

I am trying to be a bit more systematic in my file naming but I have a legacy of many (~100) photos that were added to FH by myself and other family members before I settled on a convention. I know if I change one, FH 'looses' it and puts up a crossed box, and I can then go and reset its path and re-establish it as 'Media'.
Is there a way I can do this for a batch or will I have to just do them one at a time?
Thanks
Tracing the Devon Bellamy family along with their partners.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Filenames of Photos

Post by tatewise » 16 Dec 2020 17:15

If you're considering batch mode then presumably you have some sort of algorithm that identifies the batch.

So if there are batch conversion rules try the Search and Replace plugin.
Any change it makes to the Media record File Link is simultaneously made to the actual file name and folder path.

You can choose a batch of Media Records that meet some criteria, and the Lua Pattern mode allows regular expression style conversions.
The Extra Filters tab option to tick is Multimedia Linked File fields & Media files halfway down on left.
Untick all the others.
Experiment only AFTER making a FULL BACKUP.
Even Edit > Undo Plugin Updates will NOT revert the filenames.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 16 Dec 2020 18:59

Thanks Mike.
I will try the
Any change it makes to the Media record File Link is simultaneously made to the actual file name and folder path.
solution first and see how I get on.
Tracing the Devon Bellamy family along with their partners.

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 17 Dec 2020 10:56

Tinkered with Find and Replace but I am not sure it might be the easiest way to accomplish what I want.
For example. I had already altered all my Media Certificate media names to my new convention and now want their filenames to match. Is that the best way to do it?
I am yet to go through my Media Photos and Media Documents media names and I think those will be less standardised than Certificates so I might have to do the same with those, alter their Media Names then copy those to their filenames.
Tracing the Devon Bellamy family along with their partners.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Filenames of Photos

Post by tatewise » 17 Dec 2020 11:09

If you have already altered the Media record links then they are broken and Search and Replace cannot help.
BTW: You mentioned Find and Replace which is a very different FH Edit command, not a Plugin.
Also, there are no auto-repair options for that case.
i.e. the relationship between Media record and Media file has been upset and can only be fixed by hand.

If there is no pattern to the changes you want to make then no form of automation is likely to be possible.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 17 Dec 2020 15:03

I composed my last post before rushing out and I should have said I had explored Search and Replace, not Find and Replace, sorry.
All the FH links, file > media > records are still working, all I have done to date is changed the Media Record Titles of all my Certificates to my new convention. What I would like to do next is use their Titles as their Filename.
Tracing the Devon Bellamy family along with their partners.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Filenames of Photos

Post by tatewise » 17 Dec 2020 15:47

I hope the new Media Titles are not too long and only use valid Windows filename characters.

Over long path+filename can cause a major headache.

Are you also planning to organise the Media files into sub-folders of the Project's Media folder?
If so, then how does that relate to the Media Title?

I suggest you continue altering the Media Titles and when finished the easiest solution is a custom Plugin to map the Title to the File Link and the actual filenames, but if you need me to write that Plugin it will have to wait until the new year as I am still up to my eyes in Plugin conversions.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 17 Dec 2020 16:22

That is a very generous offer and I would not put you under pressure, when you can find the time. :D :D

As an example the Certificate Titles are in the form: "1892 Marr Rec (or D/C, Baptism, B/C, Census) Name(s).jpeg", not too long.
If the / presents a problem I could replace or delete them.
I will continue changing Titles of my other media in line with my convention, that will occupy me for a while.

My Media folders are arranged as below. My Research Data does not have linked data, I have used it for ad hoc notes, spreadsheets and work in progress, placing it there means it is synchronised to my network drive when the FH data is.
IE tree.PNG
IE tree.PNG (38.38 KiB) Viewed 2087 times
Tracing the Devon Bellamy family along with their partners.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Filenames of Photos

Post by tatewise » 17 Dec 2020 16:50

The invalid filename characters are \ / : * ? " < > |

I would advise against putting the file type such as .jpeg in the Title as that goes in the Format field.

I presume all your Media files are already allocated to the appropriate folder?

Why not put the My Research Data folder under the Project's Public folder which is what it is intended for?
Then its files won't fall foul of Plugins such as Check for Unlinked Media that report Media files not linked to Media Records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 17 Dec 2020 17:15

Thanks Mike, I will make the alterations you suggest. I suppose Search and Replace could strip out the offending characters, I might have a play with it. (after a backup of course!)
Yes the other Media types are under the folder names as listed, but so far only the Certificates folder Titles have been systemised.
Tracing the Devon Bellamy family along with their partners.

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Filenames of Photos

Post by Jane » 17 Dec 2020 17:34

I have just updated an old plug I use to rename media to match the Media record title.

I have commented out the two lines which actually do the rename, but you can run it in the editor to see what it does.
Attachments
Rename Selected Media Files.fh_lua
(1.33 KiB) Downloaded 79 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
peterbel
Superstar
Posts: 301
Joined: 21 Nov 2014 20:24
Family Historian: V7
Location: Cornwall

Re: Filenames of Photos

Post by peterbel » 17 Dec 2020 18:29

Thanks Jane, JIT !!
Tracing the Devon Bellamy family along with their partners.

Post Reply