#1 2023-07-04 02:42

stone
Member
Registered: 2023-07-04
Posts: 1

Serialize files on condition

I would like to use the pascal code to do the following rename:

N_aaa
N_bbb
N_ccc

S_aaa
S_bbb
S_ccc
S_ddd

change to

1-N_aaa, 2-N_bbb, 3-N_ccc,
1-S_aaa, 2-S_bbb, 3-S_ccc, 4-S_ddd

How can I do it?

Offline

#2 2023-07-04 08:44

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

Re: Serialize files on condition

This can certainly be accomplished with the Pascal Script rule, but you can also do it with the standard renaming rules.

Rules:

1) Delete: Delete from Position 2 until the End
2) Serialize: Incremental from 1 repeat 1 step 1 (reset index if file name changes) as Prefix
3) Delete: Delete from Position 2 until the End
4) Insert: Insert "-:File_FileName:" at Position 2

Here is a demo:

renamer-topic-2956-crop.png

Offline

Board footer

Powered by FluxBB