Page 1 of 1

replace n-th occurrence of '-' with '' ?

PostPosted: Fri Nov 25, 2016 9:09 pm
by panini
Hi,

I'd like to modify Screenshot file names.
They come like this:
Screenshot_2016-08-13-10-29-07.jpg

I need them modified to:
20160813_102907.jpg

- stripping of 'Screenshot' with a 1st rule worked ok
- but how do I replace the 3rd '-' with '_' ?
before replacing '-' with '' ?

Thanks for helping out!

Re: replace n-th occurrence of '-' with '' ?

PostPosted: Mon Nov 28, 2016 12:37 pm
by Mr_Noodle
You can't use Replace text for that in this case. Instead, you might want to use custom attributes to match the portion before and after the '-'. When renaming, you can then use those custom attributes but use a '_' instead.

Re: replace n-th occurrence of '-' with '' ?

PostPosted: Mon Nov 28, 2016 1:12 pm
by panini
Sorry for my ignorance, but can you reveal a bit more? Is there some example available?
Can I somehow use YYYY-MM-DD for example?

Re: replace n-th occurrence of '-' with '' ?

PostPosted: Mon Nov 28, 2016 7:50 pm
by Mr_Noodle
Sorry about that. Search the help for "match patterns" which should explain all you need to know on this. Report back here if you are having specific problems with it.