Author Topic: Media files - relative path  (Read 3263 times)

0 Members and 2 Guests are viewing this topic.

Offline cjones8

  • VIP
  • Jr. Member
  • *
  • Posts: 6
    • View Profile
Media files - relative path
« on: June 21, 2024, 20:46:20 »
How do you add a media file to source and have it store a relative path, as you recommend in the documentation so you can move / share files on usb drive etc?

I have set the "preferences>editing>medias>Force media paths to be relative rather than absolute" option. I have closed and re-open Ancestris but still when I add a new media files using the Gallery tab on a source in the Aries editor it always stores the absolute file path / file name. This happened in v12 and still happens in v13

Is there some other setting / option I should be enabling as well?

Chris

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 4 411
    • View Profile
Re: Media files - relative path
« Reply #1 on: June 21, 2024, 21:15:19 »
Relatives path are only available from the GEDCOM files for medias placed in the directory or subdirectories.

Typically :
.\medias\ => OK
..\medias\ => NOK

Zurga

Offline cjones8

  • VIP
  • Jr. Member
  • *
  • Posts: 6
    • View Profile
Re: Media files - relative path
« Reply #2 on: June 22, 2024, 09:43:54 »
Sorry slightly confused by this.

I currently have:

C:/FamilyHistory   <-- my gedcom file here
C:/FamilyHistory/Documents <-- no files
C:/FamilyHistory/Documents/Census <-- census documents
C:/FamilyHistory/Documents/ParishRecords <-- church documents for baptism, marriage, burial
C:/FamilyHistory/Documents/...  <-- subdirectory for each media type

Are you saying if I get rid of the "Documents" level so I have ...

C:/FamilyHistory   <-- my gedcom file here
C:/FamilyHistory/Census <-- census documents
... other subdirectories for document type

relative file paths will be stored when I add media files?

With approx 1200 media files already it will be quite a bit of work to move them all (yes I know the media manager tool can help) so I don't want to get it wrong and totally mess things up.

Chris




Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 4 411
    • View Profile
Re: Media files - relative path
« Reply #3 on: June 22, 2024, 15:20:19 »
If you GEDCOM file is in : C:/FamilyHistory

Files in "C:/FamilyHistory/Documents/Census" will have "Documents/Census"
Files in "C:/FamilyHistory/Documents/ParishRecords" will have "Documents/ParishRecords"

Relatives paths are done from the path of the GEDCOM files.
And only positives path.
Typically with the GEDCOM in "C:/FamilyHistory", files in "C:/MyMedia/" won't be changed to "../MyMedia" and will stay as "C:/MyMedia/"

Zurga

Offline cjones8

  • VIP
  • Jr. Member
  • *
  • Posts: 6
    • View Profile
Re: Media files - relative path
« Reply #4 on: June 22, 2024, 20:31:18 »
Sorry Zurga

Either I am not understanding how relative file paths are supposed to work or I am doing something.

As mentioned in the initial post I have "force media paths to be relative" selected  but when I add a new file it always stores the file name in the GEDCOM as an absolute file path. My media files are in direct sub-directories of the home directory containing the GEDCOM file.

1 FILE C:/Family History/Documents/Cemetary Records/Dodd, Reginald Walter - Cremation_Burial.png <-- when first added

When I look in Media Manager the files are shown as absolute references. Media Manager shows "Relative path files are located from the GEDCOM file directory which is C:/Family History"

I can select a file and change it to be a relative reference. This then updates the GEDCOM and stores the file name as a relative path (i.e removing the drive:/{home directory} part of the absolute path).

1 FILE Documents/Cemetary Records/Dodd, Reginald Walter - Cremation_Burial.png  <-- after Media Manager change to relative

How do I get it to store the relative path when I first add the media file? Is that possible or do I have go into Media Manager and change use that to change absolute to relative paths after I first add the file?

Chris

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 4 411
    • View Profile
Re: Media files - relative path
« Reply #5 on: June 22, 2024, 22:17:42 »
I just tried and everything works as intended.
A new media in a sub-directory of the GEDCOM directory is correctly added with relative path.

I don't know why it doesn't work for you.

Zurga

Offline cjones8

  • VIP
  • Jr. Member
  • *
  • Posts: 6
    • View Profile
Re: Media files - relative path
« Reply #6 on: June 23, 2024, 14:00:31 »
OK I have a possible idea ...

I think it might be because I have spaces in the home directory for the GEDCOM file ("C:/Family History")

I just created a new family tree / GEDCOM using C:/Temp as the base directory with sub-directories
C:/Temp/Media
C:/Temp/Media/NoSpace
C:/Temp/Media/With Space

When I add a media file into each of those sub-directories the paths are stored correctly as relative paths.

When I created a second new tree/GEDCOM using C:/Temp 2 as the base directory with sub-directories
C:/Temp 2/Media
C:/Temp 2/Media/NoSpace
C:/Temp 2/Media/With Space
and media files in the sub-directories the paths are stored as absolute paths.

The only difference between the two trees/GEDCOM locations is the space in the directory name / path of the home directory of the GEDCOM file ... "C:/Temp" vs "C:/Temp 2". Spaces in the sub-directory name seem to be OK but not in the root/home directory.

Chris