If function

Advanced Renamer forum
#1 : 07/05-25 15:01
Bajusz Attila
Posts: 8
Hello,

I would like to ask for some help.
I want to rename my photos based on metadata.

I would like to:
<Filename>_<Location>
if there is no Location, then use City (<Filename>_<City>)

How should I set it so that if there is no Location, it uses City?

BR,
Attila
#2 : 07/05-25 19:08
Delta Foxtrot
Posts: 475
Reply to #1:

Hi Bajusz,

As far as I know there aren't tags like "<Location>" or "<City>". Nevertheless, you can use this idea to add any tag to the name, then add another tag only if the previous tag was empty.

1. New Name method:
New name: <Name>_<GPS Country>
Apply to: Name

2. Replace method:
Replace: _$
With: _<GPS City>
Use regular expressions: CHECKED
Apply to: Name

The replace method only fires if the filename ends with an underscore (in other words, the first tag was blank). In that case it "replaces" the underscore with another underscore and the second tag.

Best,
DF

edited: 07/05-25 19:09
#3 : 07/05-25 19:43
Bajusz Attila
Posts: 8
Reply to #2:
Hi,

Thank you very much for your help!
There are tags like <Location> and <City>, for some reason they are not shown in the program, but I use them :)

BR,
Attila
#4 : 07/05-25 20:37
Delta Foxtrot
Posts: 475
Reply to #3:

Cool! :)

DF