Skip to main content
Participant
October 27, 2017
Answered

Renaming images in bridge

  • October 27, 2017
  • 1 reply
  • 886 views

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 has been closed for replies.
Correct answer Stephen Marsh

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.

1 reply

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
October 28, 2017

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.

Stephen Marsh
Community Expert
Community Expert
October 28, 2017

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