MUT: Cyclic counter: [c10+5-4:3] (every e.g. third)
Posted: 2014-03-10, 15:49 UTC
It would be very useful if you could define a cyclical counter.
In this way, you could for example move files into differernt subdirectories, but every e.g. third or fourth file to the same subdirectory.
E.g.
Source names:
A.TXT
B.TXT
C.TXT
D.TXT
E.TXT
F.TXT
G.TXT
H.TXT
I.TXT
cyclic counter e.g. (i use lowercase c)
[c10+5-4:3]\[N]
that's means:
start at 10
step by 5
reset after each 4 occurences
width 3
result
10\A.TXT
15\B.TXT
20\C.TXT
25\D.TXT
10\E.TXT
15\F.TXT
20\G.TXT
25\H.TXT
10\I.TXT
Another example is creating date-like (year-month) filenames, using with new fractional counter:
[C2001+1/12].[c1+1-12:2]
result:
2001.01
2001.02
2001.03
2001.04
2001.05
2001.06
2001.07
2001.08
2001.09
2001.10
2001.11
2001.12
2002.01
2002.02
2002.03
2002.04
2002.05
2002.06
2002.07
2002.08
2002.09
2002.10
2002.11
2002.12
Also - automatic reset on specified conditions e.g.: on first counter/field change.
For example: many photos shooting on different days, first part of the name is always date (from filedate or exif),
second part is cyclic counter, reset on date change.
In this way, you could for example move files into differernt subdirectories, but every e.g. third or fourth file to the same subdirectory.
E.g.
Source names:
A.TXT
B.TXT
C.TXT
D.TXT
E.TXT
F.TXT
G.TXT
H.TXT
I.TXT
cyclic counter e.g. (i use lowercase c)
[c10+5-4:3]\[N]
that's means:
start at 10
step by 5
reset after each 4 occurences
width 3
result
10\A.TXT
15\B.TXT
20\C.TXT
25\D.TXT
10\E.TXT
15\F.TXT
20\G.TXT
25\H.TXT
10\I.TXT
Another example is creating date-like (year-month) filenames, using with new fractional counter:
[C2001+1/12].[c1+1-12:2]
result:
2001.01
2001.02
2001.03
2001.04
2001.05
2001.06
2001.07
2001.08
2001.09
2001.10
2001.11
2001.12
2002.01
2002.02
2002.03
2002.04
2002.05
2002.06
2002.07
2002.08
2002.09
2002.10
2002.11
2002.12
Also - automatic reset on specified conditions e.g.: on first counter/field change.
For example: many photos shooting on different days, first part of the name is always date (from filedate or exif),
second part is cyclic counter, reset on date change.