Skip to main content
Participant
Oct 27, 2017 1:40 AM UTC
Answered

Renaming images in bridge

I've only just discovered bridge, and think it may be able to do exactly what I need, using string substitution.

I have a folder of image files labelled Surname, First.jpg  for example Smith, John.jpg

I want to change the filename to the first letter of their firstname and the first 2 letters of the surname for example JSM.jpg

Is this achievable?

This topic is closed to new replies. Start a new post to keep the conversation going.
Stephen Marsh
Stephen MarshCorrect answer
Community Expert
Oct 28, 2017 10:37 AM UTC

Sure, one possible way is using this regex:

FIND: (^.{2})(?:.+,\s)(.)(?:.+)

REPLACE: $2$1

As in this screenshot:

P.S. As this is not a scripting question, the forum moderators should probably move this topic back to the general forum.

4 replies

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
Oct 28, 2017 10:37 AM UTC

Sure, one possible way is using this regex:

FIND: (^.{2})(?:.+,\s)(.)(?:.+)

REPLACE: $2$1

As in this screenshot:

P.S. As this is not a scripting question, the forum moderators should probably move this topic back to the general forum.

Translate
Stephen Marsh
Community Expert
Community Expert
Oct 28, 2017 11:23 AM UTC

Note to self to test tomorrow... Can Bridge do this in a single line entry with only the regex performing the case conversion?

$U2$U1

Translate