Suffix Sub-location

Bulk Rename Utility How-To's

Suffix Sub-location

Postby perchera » Sun Jan 05, 2025 9:35 am

Hi there,

New to this forum after a long time using BRU.

I sometimes like to add the location (sub-location) as a suffix to my pics.

Easy by manually suffixing if all pics were taken in the same city or subloaction but hard to do when in the same day or week you've moved from place to place.

I tried the <(exif:sub-location)> (also tried city, country...) but will not add anything. The tag is there, pics are tagged with geosetter, but no way to make BRU see these tags.

Other tags like geolocation.latitude will work but not city or sub-location.

Any way to get it? Not a big issue but would be nice to use sometimes.

Thank you in advance and congrats for this software!
perchera
 
Posts: 7
Joined: Sun Jan 05, 2025 9:28 am

Re: Sufix Sub-location

Postby Admin » Sun Jan 05, 2025 11:57 am

Hi, if you right-click on a picture in BRU and select show list of file properties from the menu, does the tag show in there? Or in the EXIF properties? If yes, with which label / name?
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sufix Sub-location

Postby perchera » Sun Jan 05, 2025 12:38 pm

Hi, thanks for your quick reply

When clicking on it I can see this:

LABEL
Parent ID?

VALUE
Mangeles; Yo; ESP; Isaba; Navarra; Refugio de Belagua; Spain

NAME
System.Photo.TagViewAggregate

And in another line:

LABEL
Tag
VALUE
Same as above
NAME
System.Keywords

In the value I see faces i tagged (with lightroom) plus the locations previously added with Geosetter.

Problem is they all are in the same line separated with ";" though Geosetter lists locations and sublocations correctly.

No idea how to tell BRU what part of that value set i want to use as a suffix.

Don't bother too much, it is not so important, just curious to see if there was an easy way.

Thank you
perchera
 
Posts: 7
Joined: Sun Jan 05, 2025 9:28 am

Re: Sufix Sub-location

Postby Admin » Mon Jan 06, 2025 1:28 am

Hi, would you mind sending a file for review to support via e-mail please? thanks!
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sufix Sub-location

Postby perchera » Mon Jan 06, 2025 12:18 pm

pic sent as requested to support @ bulkrenameutility co uk

Thank you!
perchera
 
Posts: 7
Joined: Sun Jan 05, 2025 9:28 am

Re: Sufix Sub-location

Postby Admin » Tue Jan 07, 2025 9:20 am

Thank you for sending the file.

Because all locations are in the same file property "tags", separated by ; , we need to use Javascript renaming to extract the value we need:

Code: Select all
// change below value to wanted position
tag_pos = 1; // first position

// do not change below this line

value = fileProperty("Tags");
parts = value.split(';');
part = parts[tag_pos-1].trim();
// suffix
newName = name + "-" + part;


This script adds the first text in the "tags" file property as suffix to the file name.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sufix Sub-location

Postby perchera » Tue Jan 07, 2025 9:41 am

Wow, that worked! Thanks so much!

I will only need to do it before I add faces since "city" is the 4th tag but it might be 5th, or 6th, or 7th once faces are detected and tagged.

Thanks again!
perchera
 
Posts: 7
Joined: Sun Jan 05, 2025 9:28 am

Re: Sufix Sub-location

Postby Admin » Tue Jan 07, 2025 10:30 am

If the "position" of the value to add changes for every file, it will be more complex to do as the script would need to change for different files... :(
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sufix Sub-location

Postby perchera » Tue Jan 07, 2025 12:51 pm

Not to worry, when i use the script i will do it before tagging faces so that the position of "city" is always "4"

Regards
perchera
 
Posts: 7
Joined: Sun Jan 05, 2025 9:28 am


Return to How-To