#11 2019-11-09 13:37

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

eR@SeR wrote:

Hi erebus,

Note: I presume that space is omitted accidentally in the second expected example, so it is added as a result, as well as "S1" in 3rd and 4th example in the second path.

Hello eR@SeR
Yes it was a typing error


eR@SeR wrote:

1) Regular Expressions: Replace expression "(.+) [Ss]0?(\d)\s?[Ee]?(\d+)" with "$1\\$1 S$2\\$1 S$2E$3" (skip extension)
2) Regular Expressions: Replace expression "((.+) (\d+))" with "$2\\$2 S1\\$2 S1E$3" (skip extension)

your both Regular Expressions, do an excellent job.

eR@SeR wrote:

Is this worked for you?

Oh Yes its work perfectly

A big thank-you

Again Thank you very much

Offline

#12 2019-11-09 18:24

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

Hello again

new sample file I did not think

File Source:
Kabukichou Sherlock 5.mp4

Now with your both Regex it give me this result:
Kabukichou Sherlock\Kabukichou Sherlock S1\Kabukichou Sherlock S1E5.mp4

instead of:
Kabukichou Sherlock\Kabukichou Sherlock S1\Kabukichou Sherlock S1E05.mp4

Do you have a solution too?

Thanks for advance


Best Regards

Offline

#13 2019-11-10 14:17

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Create Folder & Subfolder according filename

We would need one more RegEx rule to handle "Kabukichou Sherlock 5.mp4" case and one extra to handle two or more digits case like "Kabukichou Sherlock 12.mp4" by removing leading zero added by 3rd RegEx. Try them:

1) Regular Expressions: Replace expression "(.+) [Ss]0?(\d)\s?[Ee]?(\d+)" with "$1\\$1 S$2\\$1 S$2E$3" (skip extension)
2) Regular Expressions: Replace expression "((.+) (0\d))" with "$2\\$2 S1\\$2 S1E$3" (skip extension)
3) Regular Expressions: Replace expression "((.+) (\d))" with "$2\\$2 S1\\$2 S1E0$3" (skip extension)
4) Regular Expressions: Replace expression "S(\d+?)E0(\d{2,})" with "S$1E$2" (skip extension)

Source File:

Kabukichou Sherlock 5.mp4
Kabukichou Sherlock 12.mp4
Kabukichou Sherlock 123.mp4

To:

Kabukichou Sherlock\Kabukichou Sherlock S1\Kabukichou Sherlock S1E05.mp4
Kabukichou Sherlock\Kabukichou Sherlock S1\Kabukichou Sherlock S1E12.mp4
Kabukichou Sherlock\Kabukichou Sherlock S1\Kabukichou Sherlock S1E123.mp4

If you want to have leading zero, just uncheck 4th RegEx...and I hope there are no more additional cases smile


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#14 2019-11-10 15:23

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

eR@SeR wrote:

If you want to have leading zero, just uncheck

Ok

eR@SeR wrote:

I hope there are no more additional cases smile

I Hope too,

thanks you very much Again, your help and that of this community is really precious on this fabulous tool


Thanks again

Offline

#15 2019-11-10 16:15

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Create Folder & Subfolder according filename

You're welcome.

erebus wrote:

fabulous tool

You can think about buying the Pro version and use the full potential of the tool wink


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#16 2019-11-10 16:36

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

eR@SeR wrote:

You're welcome.

erebus wrote:

fabulous tool

You can think about buying the Pro version and use the full potential of the tool wink

it's been done for a few years

Offline

#17 2019-11-10 16:39

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Create Folder & Subfolder according filename

Even better.


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#18 2020-04-05 09:53

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

eR@SeR wrote:

Try them:

1) Regular Expressions: Replace expression "(.+) [Ss]0?(\d)\s?[Ee]?(\d+)" with "$1\\$1 S$2\\$1 S$2E$3" (skip extension)
2) Regular Expressions: Replace expression "((.+) (0\d))" with "$2\\$2 S1\\$2 S1E$3" (skip extension)
3) Regular Expressions: Replace expression "((.+) (\d))" with "$2\\$2 S1\\$2 S1E0$3" (skip extension)
4) Regular Expressions: Replace expression "S(\d+?)E0(\d{2,})" with "S$1E$2" (skip extension)

Hello,
sorry to disturb you again,
but I have again a slight problem. sad hmm

I have this Serie :
Major 2nd S2 01
Major 2nd S1 01

and With four Rule i Give Me that:

Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major\Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major S1\Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major S1E2nd S1\Major S1E02nd S1E01.mp4

Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major\Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major S1\Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major S1E2nd S2\Major S1E02nd S2E01.mp4

If I remove two rules "1 & 2" or "2 & 3" the files is almost good Just S1 In double :

Major 2nd S1\Major 2nd S1 S1\Major 2nd S1 S1E01.mp4
Major 2nd S2\Major 2nd S2 S1\Major 2nd S2 S1E01.mp4

I understand that this is "2nd" which poses problem

The only solution i see is remove "2nd" and re add at the end of the rules, but if another serie with the same model come back
I should do the same for the other titles.

If you have a solution ? I'll take it.

in the end i need that

Major 2nd S1\Major 2nd S1\Major 2nd S1E01.mp4
Major 2nd S2\Major 2nd S2\Major 2nd S2E01.mp4

Thanks for advance
best regards

Vincent

Last edited by erebus (2020-04-06 16:22)

Offline

#19 2020-04-06 15:44

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

Re: Create Folder & Subfolder according filename

Vincent, can you please state clearly the original full paths and the desired output full paths?

P.S. No necroposting please. Next time, start a new thread, where you can reference the old thread if needed.

Offline

#20 2020-04-06 16:56

erebus
Member
Registered: 2013-05-05
Posts: 36

Re: Create Folder & Subfolder according filename

den4b wrote:

Vincent, can you please state clearly the original full paths and the desired output full paths?

Hello Thanks for the Answer
- I corrected my previous post

den4b wrote:

P.S. No necroposting please. Next time, start a new thread, where you can reference the old thread if needed.

- Its not necrposting is continuation  i start this post for Create Folder & Subfolder according filename, the method a changed but is but it's the same function maybe I misspoke

i start again

File Start:
- Ace Of Diamond S4 01.mp4
- Major S1 01.mp4
- Major 2nd S2 01.mp4
- Major 2nd S1 01.mp4

Rule Used:

eR@SeR wrote:

1) Regular Expressions: Replace expression "(.+) [Ss]0?(\d)\s?[Ee]?(\d+)" with "$1\\$1 S$2\\$1 S$2E$3" (skip extension)
2) Regular Expressions: Replace expression "((.+) (0\d))" with "$2\\$2 S1\\$2 S1E$3" (skip extension)
3) Regular Expressions: Replace expression "((.+) (\d))" with "$2\\$2 S1\\$2 S1E0$3" (skip extension)
4) Regular Expressions: Replace expression "S(\d+?)E0(\d{2,})" with "S$1E$2" (skip extension)

File Result With rules

-  Ace Of Diamond\Ace Of Diamond S4\Ace Of Diamond S4E01
-  Major\Major S1\Major S1E01
- *Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major\Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major S1\Major 2nd\Major 2nd S1\Major\Major 2nd\Major 2nd S1\Major S1\Major 2nd\Major S1E2nd S1\Major S1E02nd S1E01.mp4
- *Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major\Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major S1\Major 2nd\Major 2nd S2\Major\Major 2nd\Major 2nd S2\Major S1\Major 2nd\Major S1E2nd S2\Major S1E02nd S2E01.mp4

* there is a problem

what I want:

- Ace Of Diamond\Ace Of Diamond S4\Ace Of Diamond S4E01.mp4
- Major\Major S1\Major S1E01.mp4
- Major 2nd\Major 2nd S2\Major 2nd S2E01.mp4
- Major 2nd\Major 2nd S1\Major 2nd S1E01.mp4

The problem would come from"2nd" and I wanted to see if there was any other solution than removing "2nd" and having to add "2nd" at the end.

I hope to have been clear
sorry english is not my language

Thanks for advance
Best Regards

Vincent

Offline

Board footer

Powered by FluxBB