#1 2018-08-30 06:50

Alanick
Member
Registered: 2018-08-30
Posts: 2

Rearrange-Rename HASH named files.

Greetings everyone,

I am new here, but not new using ReNamer, well, basic functions smile, but id like to try something more complex and I cant seem to find the right answer, I looked in the forum and I can't seem to find the right information to my example.

I have thousands of files named in 32 digit HASH, like this.

FECAAFC2309C055D7E7D61C4C669F9C0.dat

Needs to look like this:

C2AFCAFE9C305D057E7D61C4C669F9C0.dat

But they need to be renamed as follows:

 0  1  2  3  4  5  6  7  8 9101112131415
FE CA AF C2 30 9C 05 5D 7E7D61C4C669F9C0
C2 CA AF FE 30 9C 05 5D 7E7D61C4C669F9C0 #0 with 3
C2 AF CA FE 30 9C 05 5D 7E7D61C4C669F9C0 #1 with 2
C2 AF CA FE 9C 30 05 5D 7E7D61C4C669F9C0 #4 with 5
C2 AF CA FE 9C 30 5D 05 7E7D61C4C669F9C0 #7 with 6

Ergo:
 3  2  1  0  5  4  7  6  8 9101112131415
C2 AF CA FE 9C 30 5D 05 7E7D61C4C669F9C0

There for I have to rearrange the first 8(16) groups by two, and the rest 8(16) of them untouched.
Is there any way this can be achieved in a more automatic way please?

Offline

#2 2018-08-30 08:03

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Rearrange-Rename HASH named files.

You can achieve this with either of these rules:

1) Rearrange
2) Regular Expressions
3) Pascal Script

Here is the configuration for a Rearrange rule:

Split by positions: 3|5|7|9|11|13|15|17
New pattern: $4$3$2$1$6$5$8$7$9
Skip extension: YES

Here is the configuration for a Regular Expressions rule:

Expression: \A(..)(..)(..)(..)(..)(..)(..)(..)(.*)\Z
Replace: $4$3$2$1$6$5$8$7$9
Skip extension: YES

Using either of these rules, if you have a filename:

FECAAFC2309C055D7E7D61C4C669F9C0.dat

The resulting new name will be:

C2AFCAFE9C305D057E7D61C4C669F9C0.dat

Offline

#3 2018-08-30 23:22

Alanick
Member
Registered: 2018-08-30
Posts: 2

Re: Rearrange-Rename HASH named files.

Thank you very much for your response.

It works marvelously well, and everything works as should now.

In October will be 10 years since I've discovered/using this marvelous utility, ReNamer, thank you very much for still working on it to improve it and make it great.

Cheers.

Offline

#4 2018-09-01 08:34

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Rearrange-Rename HASH named files.

Alanick wrote:

In October will be 10 years since I've discovered/using this marvelous utility, ReNamer, thank you very much for still working on it to improve it and make it great.

Congratulations with the upcoming anniversary! smile

Offline

Board footer

Powered by FluxBB