#11 2019-11-09 13:37

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

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: 32

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: 318

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: 32

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: 318

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: 32

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: 318

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

Board footer

Powered by FluxBB