Page 1 of 1

substitute specific digits with different specific digits

PostPosted: Thu Aug 27, 2020 10:17 pm
by domaniqs
Hi All,
I'm puzzling over this for few hours, also checked the forum but couldn't find any answer that would point me in the right direction.
I'm trying to replace digits in the filenames of pictures with different digits to obfuscate the original digits but in a way, to be able to go back if I have to.
So I would like to replace the filenames like:

    H10013_20140910125148741.jpg
    H10013_20140910125149287.jpg

in a way, that 0 would be replaced with 6,
1 with 3,
2 with 9,
3 with 7,
4 stays as 4,
5 with 2,
6 with 0,
7 with 1,
8 with 5
and 9 with 8.

This way, the final names would look like:

    H36637_96346836392345743.jpg
    H36637_96346836392348951.jpg

I don't actually know what would be better way to achieve this: RegEx or JavaScript. Anything actually would be nice to get this done.

All the best
Maciej

Re: substitute specific digits with different specific digits

PostPosted: Fri Aug 28, 2020 5:55 am
by David
use Character Translations

1=3
2=9
3=7
5=2
6=0
7=1
8=5
9=8
0=6

will do the job.

Re: substitute specific digits with different specific digits

PostPosted: Fri Aug 28, 2020 11:31 am
by domaniqs
it worked a treat! 2750 images in under a minute.
Amazing program, have to read that Utility Operations Manual to get to know it better.
Thanks David

Maciej