#1 2010-05-20 22:57

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Serialize rule - reset counter for every n files

Maybe you like the idea to add this addition to the serialize rule?

(o) Incremantal: 1,1
[X] Reset every [   4] files

1
2
3
4 Reset
1
2
3
4 Reset
1
2
3.
...


EDIT: The script below is not needed anymore, because of:

ReNamer 5.50+ Beta 28 (~23.05.2010)
* Added option to reset serialization index every N files;


----
Till then we can use this ReNamer PascalScript:
Based on an script of Denis (http://www.den4b.com/forum/viewtopic.php?pid=1862#p1862)

const
  PADTO = 3; //amount of digits: 2=01 / 3=001 / 4 = 0004
  RESET = 9; //reset count every n amount: 4 = 1,2,3,4,1,2,3,4,1,2,3...

var
  Index: Integer;
  Value: String;
  
begin
  Index := Index + 1;    
  IF (Index > RESET) then
      Index := 1;
     
  Value := IntToStr(Index);
  if PADTO > 1 then
    while Length(Value) < PADTO do
      Value := '0'+Value;
      
  FileName := Value + ' '+FileName;  
 
end.

Last edited by Stefan (2010-05-30 20:56)


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#2 2010-06-03 15:16

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

Re: Serialize rule - reset counter for every n files

ReNamer 5.50+ Beta 28 (~23.05.2010)
* Added option to reset serialization index every N files;

I'm glad that you noticed the change already! smile

Offline

#3 2010-10-11 10:00

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Serialize rule - reset counter for every n files

Related issue.

Often asked for: use the same counter for n files, then increase the counter.

e.g.
use the same counter '001' for 3 files, then increase the counter to '002' for the next 3 files:

a001.ext
b001.ext
c001.ext

d002.ext
e002.ext
f002.ext


Example code:
http://www.den4b.com/forum/viewtopic.php?pid=5011#p5011


But i have no good name found for this, only something like "serialize n files with the same count.pas"

Last edited by Stefan (2010-10-11 10:12)


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB