Page 1 of 1

File renaming pattern question

Posted: 31 Oct 2018 18:06
by tomuser
Today is a questions day for me :D

Anyway, I have bunch files named like this (currently, this may change in future):

Code: Select all

20180911_154208_12.png
It is date and time and also some random number at the end. First 16 digits are same always, end may change only (number after time). I'd like to rename them so they'll look like this:

Code: Select all

2018-09-11_15-42-08_12.png
Tried to experiment all kind of known things like *$\<> in tons of options which I could think of but whatever I tried so far I got Invalid name error. (I haven't dealt also pretty long with these so I may be missing something very simple or obvious).

What wildcards and how should they be used in Batch Rename to end up like this? Or should I use some other option in XYplorer?

Re: File renaming pattern question

Posted: 31 Oct 2018 18:32
by highend
RegExp Rename!

Code: Select all

(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})_(.*) > $1-$2-$3_$4-$5-$6_$7

Re: File renaming pattern question

Posted: 31 Oct 2018 18:49
by tomuser
highend wrote: 31 Oct 2018 18:32 RegExp Rename!

Code: Select all

(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})_(.*) > $1-$2-$3_$4-$5-$6_$7
Aha, that was the catch. From here I can modify it further if needed. Thanks!