* Family historian and OneDrive, advice required.

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
John3537
Newbie
Posts: 4
Joined: 06 Dec 2022 14:55
Family Historian: V6.2

Family historian and OneDrive, advice required.

Post by John3537 » 06 Dec 2022 16:02

Hello.

Last year I found a lot of media files renamed and with broken links which I renamed from and repaired the links from a back up, every thing working OK.

Last month I discovered some broken links and repaired them, but yesterday I discovered 186 media files renamed with some being duplicated and with broken links, I tracked the problem down to windows OneDrive (apparently it can't handle long file names) I have stopped OneDrive for the moment.

So to stop this problem from happening in the future I have 3 option.

1. Connect an external drive and move Family Historian Projects folder to this drive.
2. Drag the Family Historian Projects folder from "C:\Users\name\OneDrive\Documents\" to "C:\Users\New Folder\".
3. Change the default location in Family Historian Project window to a new folder away from OneDrive\Documents.

I am unsure which of the above would work and be the easiest implement.

Can anyone advise on the above or does someone have an alternative solution.

Thanks

OS. Windows 11 Home 22H2
FH. 6.2.7

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

Re: Family historian and OneDrive, advice required.

Post by Mark1834 » 06 Dec 2022 16:51

Can you clarify how long your file names and paths are please?

This link to a Microsoft support document indicates up to 400 characters is ok for OneDrive. "Out of the box", Windows 10/11 support up to 260 characters, but essentially unlimited with a minor Registry change.

PS - Welcome to FHUG!
Mark Draper

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Family historian and OneDrive, advice required.

Post by davidf » 06 Dec 2022 17:41

Two thoughts:

1. Drive susbtitution

It has been a while since I worked on Windows but in my Wine on Linux setup (which mimics a Windows environment), I can use substitute drives to shorten path/filenames.

I imagine that this facility uses an equivalent to the MSDOS command subst. A quick internet search indicates that this is still available on Windows 11! For instance https://www.computerhope.com/substhlp.htm
Subst syntax

Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1: Specifies a virtual drive you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.
So you could execute:

subst G: "C:\Users\name\OneDrive\Documents\Family Historian Projects"

(I am pretty sure that the inverted commas are essential with a file path that has spaces). You need to make the command execute on startup (which used to mean putting it in autoexec.bat - what happens in Windows 10+, I don't know; the facility must be there!)

Then you just refer to G:\Family Historian Sample Project rather than C:\Users\name\OneDrive\Documents\Family Historian Projects\Family Historian Sample Project

Note that the above source says "you cannot subst network drives" so you may have to take care if "\OneDrive\" is being interpreted as a "network drive".

2. Media file names

Some people have long (meaningful) media filenames. For FH this is totally unnecessary because as soon as you have associated an image file with a media record, you can refer to it by means of the Name of the Media Record.

I either invent heavily abbreviated filenames, or when downloading stick with the (relatively short) filename provided. This has the advantage that if I try to download the same file a second time - I get the operating system prompt "Do you want to overwrite this file" - which warns me that if for instance this is a census image, I probably have this image linked to someone already in my tree. (So I am either repeating work already done (!) or I have found a neighbour or other member of the household - which is useful to know)

If you adopt this practice you can also keep all media in the media directory without extensive subdirectories for different types of image (your media record tells you that). So subject to some theoretical limit on the number of files in a directory, you can avoid some path/filename length by abandoning subdirectories in your media directory.

Changing to that state (short but unique file names, and meaningful Media Record titles) is potentially a lengthy process; it is not complicated but you need to think carefully about what you are doing and go slowly!
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 06 Dec 2022 18:17

As Mark says, before getting embroiled in solutions that may be unnecessary, what are the full file paths of the problem Media?

John, please confirm that only this one PC is synchronising with OneDrive.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
John3537
Newbie
Posts: 4
Joined: 06 Dec 2022 14:55
Family Historian: V6.2

Re: Family historian and OneDrive, advice required.

Post by John3537 » 07 Dec 2022 19:31

Hi thanks for the responce.

Mark
Below is the file path for the files and an example of the renaming. NB I did not set this folder path.

C:\Users\steve\OneDrive\Documents\Family Historian Projects\All Families\All Families.fh_data\Media\15Jun1915 After.tiff. This file was copied and renamed as ~fh5BF8.tiff

C:\Users\steve\OneDrive\Documents\Family Historian Projects\All Families\All Families.fh_data\Media\StevenBen1881.pdf. This file was renamed only as ~fhC4E0.jpeg

Only png, tif and jpg file are being copied& renamed doc and pdf are only being renamed.

Mike
I can confirm that this is the only PC synchronising with OneDrive.

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 07 Dec 2022 20:56

Something very odd is going on.

Those file paths are relatively short, and nowhere near the ~250-character limit. So that is not the cause.
They are the standard file paths for a Project named All Families with files in the Media subfolder.

Your examples show the filenames being changed to ~fh**** where * is any hex character from 0 - 9 & A - F.
That they start with ~fh means it is the FH program that is making those changes. It often uses that format.
It is even stranger that in your 2nd example it changes the file type from .pdf to .jpeg

I'm somewhat mystified by some of your descriptions.
In your postings, you mention 'copied', 'renamed' and 'duplicated' in various combinations.

Where are the files 'copied' from and to?
You say some are 'copied' and 'renamed' and others are just 'renamed'.
You also say there are 'duplicates'.

Do you mean the 15Jun1915 After.tiff file still exists but has a copy named ~fh5BF8.tiff and if so how do you know it is a copy?

Whereas the StevenBen1881.pdf file no longer exists and a copy ~fhC4E0.jpeg does exist but how do you know that is a copy?

BTW: Please right-click the OneDrive icon bottom right, and open the Settings dialogue, then the left-most Settings tab.
Is the Files On-Demand setting at he bottom for 'Save space and download files as you use them' ticked or not?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Family historian and OneDrive, advice required.

Post by NickWalker » 07 Dec 2022 21:03

Using OneDrive is a major part of what I do both at home and at work and it works very well. I sync between 3 different computers regularly (2 of them using files on demand) and very rarely have any problems and certainly nothing like this. I'd be very surprised if this issue is related to OneDrive, particularly as the files referred to appear to be generated by Family Historian.

I agree with everything Mike said in the post above and these are very similar to the questions and points I would have made too.
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

avatar
victor
Superstar
Posts: 262
Joined: 08 Jan 2004 16:53
Family Historian: V7
Location: Thatcham, Berkshire, England

Re: Family historian and OneDrive, advice required.

Post by victor » 07 Dec 2022 22:21

I have
C:\Users\steve\OneDrive\Documents\Family Historian Projects\Family
Under family I add sub files for each surname and save my media files in them. When working on my tree I import the media file of the person I am working on. I have separate files for each census years and BMD.
When working in FH under a particular person I import the media file from the fold I have kept it in.
When in AS I import census or BMD file into there and these are saved in FH.

Victor

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 07 Dec 2022 23:17

Victor, sorry, how is that relevant to this OneDrive filename corruption problem?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
victor
Superstar
Posts: 262
Joined: 08 Jan 2004 16:53
Family Historian: V7
Location: Thatcham, Berkshire, England

Re: Family historian and OneDrive, advice required.

Post by victor » 07 Dec 2022 23:41

I was simply saying what I have done and what I have said is on One Drive and there is no corruption so I have no idea how it has happened Mark.
Mark wrote
C:\Users\steve\OneDrive\Documents\Family Historian Projects\All Families\All Families.fh_data\Media\15Jun1915
What I said was to indicate that my media is seperate from the above kind of link. I presume all his media files go direct to FH media whilst mine are only added to media from the folders I have set up.
The media in my folders do not enter the FH media system until I have added them when working on an individual. If I need to repeat the same media to another person I add that via the media folder via that persons name

Victor

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 07 Dec 2022 23:45

No doubt dozens of FH and OneDrive users could post here that they do not have any corruptions, but that does not help John solve his problem in any way whatsoever.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
John3537
Newbie
Posts: 4
Joined: 06 Dec 2022 14:55
Family Historian: V6.2

Re: Family historian and OneDrive, advice required.

Post by John3537 » 08 Dec 2022 15:37

Mike
Do you mean the 15Jun1915 After.tiff file still exists but has a copy named ~fh5BF8.tiff and if so how do you know it is a copy?

Yes they still exist except for jpeg files, I don’t know if they are copies or duplicates when opened they are the same picture.
Whereas the StevenBen1881.pdf file no longer exists and a copy ~fhC4E0.jpeg does exist but how do you know that is a copy?
Sorry this is a mistype should have read StevenBen1881.jpeg.
BTW: Please right-click the OneDrive icon bottom right, and open the Settings dialogue, then the left-most Settings tab.
Is the Files On-Demand setting at he bottom for 'Save space and download files as you use them' ticked or not?
I am unable to do the above as I have unlink this PC from OneDrive for the moment.

As I only use OneDrive very occasionally I intend to uninstall OneDrive, I will then have a look at what's been uploaded to OneDrive, all I know for certain is that the file changes happen on both occasions when OneDrive was signed into and running.

Thanks for your help
John

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 08 Dec 2022 16:38

John, I wonder if that process of uninstalling and reinstalling OneDrive is part of the problem.
I presume the corruptions never occur when OneDrive is not installed.

Every time OneDrive is reinstalled I suspect it has to resync all the files, which can take some time (especially large Media).
During that process, the OneDrive icon has arrows showing it is busy syncing.
Next time, try waiting until OneDrive has finished syncing with no arrows and hovering over the icon says 'Up to date'.
Don't use FH until that stable state is reached.

Also, I suspect when OneDrive is reinstalled the Files On-Demand setting I mentioned is ticked by default.
That means files can be removed from your PC OneDrive folder and only exist in the OneDrive cloud store.
When needed they can be downloaded 'On-Demand' which may take a while and FH may not be expecting to wait.

Finally, what is your Broadband speed? If slow then that may have an impact, but I'm clutching at straws.

It may be worth asking CP under what circumstances could Media files get renamed to that ~fh**** format.
Use their http://www.calico-pie.com/osticket/open.php support ticket system.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Little.auk
Famous
Posts: 224
Joined: 23 Jul 2021 08:51
Family Historian: V7
Location: Tamworth, Staffordshire, UK

Re: Family historian and OneDrive, advice required.

Post by Little.auk » 09 Dec 2022 11:56

tatewise wrote:
08 Dec 2022 16:38
John, I wonder if that process of uninstalling and reinstalling OneDrive is part of the problem.
I presume the corruptions never occur when OneDrive is not installed.
Are you using OneDrive to synchronise FH on two or more devices? (e.g. a PC and a Laptop). If so I recommend you look at the Knowledge Base article on synchronising Family Historian Settings at https://fhug.org.uk/kb/kb-article/synch ... junctions/

Even if you are not, setting up directory junctions is a good idea. FH keeps a lot of program data files in the hidden Windows ProgramData directory (C:\ProgramData\Calico Pie\Family Historian). This includes Queries, Reports and Plugins. using directory junctions enables you to create a link between these folders and copies in your OneDrive directory.

I installed directory junction links because I wanted to use FH on my PC and (Occasionally) on a laptop. I actually found that I had fewer issues run this way, and it means that I always have an up to date copy all these files on OneDrive.
Peter Rollin
Running FH 7.0.20 and AS 7.7.7 64 bit in Windows 11

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

Re: Family historian and OneDrive, advice required.

Post by tatewise » 09 Dec 2022 12:29

Thank you for that advice Peter but it is not relevant to this thread.
The OP has already said they only have one PC connected to OneDrive.
This thread is focusing on why simple Media files get their filenames corrupted and adding directory junctions would only complicate things.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Little.auk
Famous
Posts: 224
Joined: 23 Jul 2021 08:51
Family Historian: V7
Location: Tamworth, Staffordshire, UK

Re: Family historian and OneDrive, advice required.

Post by Little.auk » 09 Dec 2022 14:04

Actually I believe it is relevant - I did go on to say that, even if you only using a single device, there is an advantage in using directory junctions with OneDrive.

When I first started using FH with OneDrive, I too had a few glitches, which I thought were teething troubles setting up OneDrive.

I can't claim that installing Directory Junctions cured a problem, but (I am tempting fate here) -- since I set up the Directory Junctions (effectively moving the FH files onto OneDrive) I have had no issues with FH OneDrive synchronisation at all.
Peter Rollin
Running FH 7.0.20 and AS 7.7.7 64 bit in Windows 11

avatar
John3537
Newbie
Posts: 4
Joined: 06 Dec 2022 14:55
Family Historian: V6.2

Re: Family historian and OneDrive, advice required.

Post by John3537 » 09 Dec 2022 15:09

Hi all,

I have run a system scan and discovered I had two Windows Packages Files (which work with windows updates) missing, the date of the recent Security Update windows 11 22H2 coincides with my problems starting.

I have run System File Checker and it has replaced the files, I have also restored my FH backup, at the moment every thing is working OK.

Thanks
John

Post Reply