#1 2018-07-30 12:51

Stamimail
Member
Registered: 2016-05-08
Posts: 69

Reformat date and insert into a different position

I have this file:

144000356666_30072018_0001333299.pdf

I wanted to make it like this:

2018-07-30 - 144000356666_30072018_0001333299.pdf
(Keeping the original Filename and add the Reformatted Date in the beginning.)

But I didn't find the right technique how to make it in ReNamer.
Also, I think Renamer still does not support ddmmyyyy.
typing manually _ddmmyyyy_ also didn't work.

Last edited by Stamimail (2018-07-30 12:52)

Offline

#2 2018-07-30 16:19

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 2,649

Re: Reformat date and insert into a different position

Using ReNamer 6.9 with the following Reformat Date rule:

Convert to "_yyyy-mm-dd_" from "_ddmmyyyy_", skip extension

Input filename:
144000356666_30072018_0001333299.pdf

Output filename:
144000356666_2018-07-30_0001333299.pdf

If you want to reformat it but insert in a different location, you can either use a RegEx rule on its own, or continue using the Reformat Date but duplicate the date in-place with some delimiters and then move it using a Rearrange rule, for example.

So if you take these two rules:

1) Reformat Date: Convert to "{yyyy-mm-dd}_ddmmyyyy_" from "_ddmmyyyy_", skip extension
2) Rearrange: Split by exact pattern of delimiters "{", "}", New pattern "$2 - $1$3" (skip extension)

Input filename:
144000356666_30072018_0001333299.pdf

Output filename:
2018-07-30 - 144000356666_30072018_0001333299.pdf

Offline

#3 2018-07-30 20:41

Stamimail
Member
Registered: 2016-05-08
Posts: 69

Re: Reformat date and insert into a different position

Thank you for your solution.

I found the problem.
The problem was that "Match as whole words only" was enabled by default, and I was expecting that things would work by the default settings.

I still think that this task is not an easy one to be done by ReNamer.
I'm talking about associativity. To be able to find the way for solution without need to look in the help file.

Offline

Board footer

Powered by FluxBB