#1 2012-12-04 05:32

erm00
Member
Registered: 2012-12-04
Posts: 6

Add number to leading digits for a group of files

Hi, my name is "Moon, Tae bu".

I have a question.

before

01 Mattew01 Chapter.txt
01 Mattew02 Chapter.txt
...

02 Mark01 Chapter.txt
02 Mark02 Chapter.txt
...

03 Nuke01 Chapter.txt
03 Nuke02 Chapter.txt
...
23 Revelation21 chapter.txt
24 Revelation22 chapter.txt


after

40 Mattew01 Chapter.txt
40 Mattew02 Chapter.txt
...

41 Mark01 Chapter.txt
41 Mark02 Chapter.txt
...

42 Nuke01 Chapter.txt
42 Nuke02 Chapter.txt
...
66 Revelation21 chapter.txt
66 Revelation22 chapter.txt

How can do this???


-----------
Changed subject from:
Script? Regex?
TO:
ReNamer: add number to leading digits for a group of files

Stefan
-------------

Last edited by erm00 (2012-12-04 05:33)

Offline

#2 2012-12-04 07:09

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

Re: Add number to leading digits for a group of files

Hi Tae bu, welcome!

MTb> How can do this???

1- Remove the first two signs.
.. Mattew02 Chapter.txt

2- Do an new serializing, prefix, start at 40.
40 Mattew02 Chapter.txt



Or are the serials not progressional?

Do you have to do the math on each name?
But what is the rule then?
40 - 01 =39
42 - 03 =39
66 - 23 =43, so your '66' should be '62', isn't it?


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

#3 2012-12-04 09:11

erm00
Member
Registered: 2012-12-04
Posts: 6

Re: Add number to leading digits for a group of files

Hi, Stefan,

thanks for my question.

oh no, I'm sorry wrong  Question.

01+39 = 40
02+39 = 41
03+39 = 42
..
26+39 = 65
27+39 = 66

do this code.

How can this code? regex? script?

Offline

#4 2012-12-04 10:14

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

Re: Add number to leading digits for a group of files

erm00 wrote:

Hi, Stefan,

thanks for my question.

oh no, I'm sorry wrong  Question.

01+39 = 40
02+39 = 41
03+39 = 42
..
26+39 = 65
27+39 = 66

do this code.

How can this code? regex? script?



1.)
Remove the first two signs.
.. Mattew02 Chapter.txt


2.)
Do an new serializing, prefix, start at 40.
40 Mattew02 Chapter.txt



Will this work?
Do you need more step-by-step advise?


.


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

#5 2012-12-04 11:30

erm00
Member
Registered: 2012-12-04
Posts: 6

Re: Add number to leading digits for a group of files

oh, stepan thanks...

but, i don't want to this answer

no more step-by-step advice.

i know remove rules and prefix rules.

but this way to 27 times again again...

i don't want a 27 times again.

i want this code 1 time for script or regex.

Thank you Listen to my question.

Offline

#6 2012-12-04 12:12

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

Re: Add number to leading digits for a group of files

You have to do this two steps only one time, not 27 times.
Or do you talk about several sub folders?
Are those files not all in one single folder?

At the moment I can not understand what you want.
Please describe more accurate.

Maybe you can provide an link to an screenshot?
Or mention your mother language, perhaps some other user can help and translate.
Or utilize g00gle translator, it should be good enough for us.


The same in Korean

이 두 단계 ... 단지 한 번이 아닌 27 배를해야합니다.
또는 여러 개의 하위 폴더에 대해 이야기합니까?
이러한 파일은 모든 하나의 폴더에 있습니까?

현재 당신이 원하는 일을 이해 할 수 없습니다.
더 정확한 설명을 입력하세요.

아마 당신은 스크린 샷에 링크를 제공 할 수 있습니까?
아니면 다른 사용자가 도움 번역 할 수 있습니다, 네 엄마 언어를 언급.
또는 g00gle 번역기를 활용, 우리 충분해야합니다.

.


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

#7 2012-12-05 05:08

erm00
Member
Registered: 2012-12-04
Posts: 6

Re: Add number to leading digits for a group of files

Hi, Stefan


ok, your Answer
https://docs.google.com/open?id=0B-mUMw … WZNdWdackE
your Answer

my, want
https://docs.google.com/open?id=0B-mUMw … 3RCUmFJTG8
my Want

Please, Help me Stefan ㅠㅠ

Last edited by erm00 (2012-12-05 08:09)

Offline

#8 2012-12-06 21:11

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

Re: Add number to leading digits for a group of files

Ahh now i get it.

You have groups of files which all starts with the same number.
So we can not just serialize in sequence each after the other.
You just want to exchange the leading number by an number count-up with 39.

FROM:
01 name.exe
21 name.exe
36 name.exe

TO +39:
40 name.exe
60 name.exe
75 name.exe


FROM:
01 file name 01.ext
01 file name 02.ext
01 file name 03.ext
01 file name 04.ext

02 file name 01.ext
02 file name 02.ext
02 file name 03.ext
02 file name 04.ext

03 file name 01.ext
03 file name 02.ext
03 file name 03.ext
03 file name 04.ext

TO:
40 file name 01.ext
40 file name 02.ext
40 file name 03.ext
40 file name 04.ext

41 file name 01.ext
41 file name 02.ext
41 file name 03.ext
41 file name 04.ext

42 file name 01.ext
42 file name 02.ext
42 file name 03.ext
42 file name 04.ext


DO:
use this PascalScript with den4b ReNamer
:

Calculate_Number_Based_on_Digit_in_filename.pas

var
SubPatterns: TStringsArray;

Begin
   //RegEx: match leading digits, then space and anything else
   SubPatterns:=SubMatchesRegEx(FileName,'^(\d+)( .*)$',false);
   if Length(SubPatterns) <=0 then exit;

   //compose new FileName: add '39' to found number, then add the second sub-match
   FileName := IntToStr(StrToInt(SubPatterns[0]) + 39) + SubPatterns[1];
End.



(see our wiki for an howto using rules and scripts ReNamer:Rules:PascalScript)



HTH? big_smile
If yes, see my signature if you are able to help Denis too, thanks.


Find me: Calculate Number Based on Digit in filename do the math count up compute


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

#9 2012-12-07 05:44

erm00
Member
Registered: 2012-12-04
Posts: 6

Re: Add number to leading digits for a group of files

Oh! Oh! big_smile

I want answers.

Thank you, Stefan.:cool:

Offline

Board footer

Powered by FluxBB