File renaming pattern question

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tomuser
Posts: 132
Joined: 04 Dec 2009 18:52

File renaming pattern question

Post 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?

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: File renaming pattern question

Post 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
One of my scripts helped you out? Please donate via Paypal

tomuser
Posts: 132
Joined: 04 Dec 2009 18:52

Re: File renaming pattern question

Post 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!

Post Reply