I hoping one of the FH experts can answer here but at present I am guessing it is just not possible.
I maintain a media collection carefully named to a standard I adopted many years ago, Ancestry and other crazy file names often invade my collection and I want to filter and resolve these using the new Rename options.
The problem I have hit is one of displaying Media File Name only as a column, I see the Right, Left and Mid functions but no way to calculate the split from the string? In VBA what I am looking for would be best described below but there is no InStr function I can find in FH
Mid(OBJE.FILE, (InStrRev(OBJE.FILE, "\")) + 1)
Am I right in making the assumption this cannot be done?
Thankfully FH displays file name only in the Title where a Custom Title has not yet been added by the user.
* Display Media File Name only
Display Media File Name only
Genealogy Reviews - research methods for a more productive future
Re: Display Media File Name only
I think the function FindText does this ... have a look here:
https://www.family-historian.co.uk/help ... dtext.html
https://www.family-historian.co.uk/help ... dtext.html
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
- ColeValleyGirl
- Megastar
- Posts: 4853
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
- Contact:
Re: Display Media File Name only
I believe that you need to use a function (FieldText or GetFieldText?) to access the file path/name FILE.OBJE as a text string; and then use the Section function to split it first at the last path separator and then at the "." between name and extension.
However, I can't get the exact syntax right (every time I use a data reference I have to go back to basics), and I could be completely wrong.
However, I can't get the exact syntax right (every time I use a data reference I have to go back to basics), and I could be completely wrong.
Helen Wright
ColeValleyGirl's family history
ColeValleyGirl's family history
Re: Display Media File Name only
A quick experiment shows that:
will return the position of the first backslash character. You can then use MID or SECTION to grab the text you need. The difficulty for me is that my File shows multiple backslashes for directory nesting, and they have different levels, eg:
And I couldn't figure how to distinguish the last blackslash.
Code: Select all
=FindText(%OBJE.FILE[1]%,"\")Code: Select all
Media\Census\UK Census 1921\UK Census 1921 - Wales, New Tredegar, 27 Pritchards Terrace.jpg
Media\Census\Non UK\US\1950\US Census 1950 - Pennsylvania, Blair, Altoona, 228 22nd Avenue.jpgAdrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
Re: Display Media File Name only
There could be multiple \ and multiple dots. Get the string length, find last dot position and last\ position then you use a mid string function. Might help to reverse the string.