I have a bunch of photo's where I like to update the Headline and Document Title. In this use case I can re-use the filename with macro %FileName to fill both elements. Also in this use case, some filenames are numbered/sequences due to same object name; like 'anemone shrimp (03)' or 'anemone shrimp (04)' etc.
is there a way to substring the %FileName so that I can remove the ' (03)' for example or remove last 5 characters?
I tried several options like
%FileName{trunc={width={%FileName}-5}}
but I miss the clue somewhere
who can give me a macro that will remove the sequence at the end?
thanks
help needed with a macro
Re: help needed with a macro
I'm not entirely sure, I think you could do this with the following (can't test right now)
Example 1:
%FileName{word=1,,(}
where the character ( would be the separator and then take the first word from it
Example 2:
%FileName{left=5}
or {right=20}
%FileName{mid=4,10}
Example 1:
%FileName{word=1,,(}
where the character ( would be the separator and then take the first word from it
Example 2:
%FileName{left=5}
or {right=20}
%FileName{mid=4,10}
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)
Re: help needed with a macro
thanks for reaching out.
this one works fine for me: %FileName{word=1,, (}
I added an extra space and then it works I'm happy
this one works fine for me: %FileName{word=1,, (}
I added an extra space and then it works I'm happy