Running FileBot from the console, Groovy scripting, shell scripts, etc
pax0707
Posts: 63 Joined: 25 Jun 2014, 09:44
Post
by pax0707 » 26 Apr 2020, 20:38
I have a large number of comics that I need to put into a folder structure.
Something like Sorted/*1st letter of name*/name/fn.ext.
The name should be anything before number followed by an open bracket or in case of volumes v*number* or "vol".
Any chance for a proper format expression that would help me do that?
Code: Select all
Belle - Oath of Thorns 05 (of 06) (2020) (digital) (The Seeker-Empire).cbr
Ascender 009 (2020) (Digital) (Zone-Empire).cbr
20XX 003 (2020) (Digital) (Mephisto-Empire).cbr
Star Wars - Darth Vader 001 (2020) (Digital) (Kileko-Empire).cbz
The After Realm 001 (2020) (Digital) (Mephisto-Empire).cbr
Hellboy v12 - The Storm and the Fury (2012) (Digital) (Zone-Empire).cbr
Hellboy v8 - Darkness Calls (2008) (Digital) (Zone-Empire).cbr
The Waking Vol 1 TPB (2010) (Digital) (K6-Empire).cbr
kim
Power User
Posts: 1251 Joined: 15 May 2014, 16:17
Post
by kim » 26 Apr 2020, 22:25
rednoah
The Source
Posts: 23928 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 27 Apr 2020, 07:24
e.g. matching the substring before the first number pattern:
pax0707
Posts: 63 Joined: 25 Jun 2014, 09:44
Post
by pax0707 » 27 Apr 2020, 20:29
kim wrote: ↑ 26 Apr 2020, 22:25
*1st letter of name* =
If 1st character is a number this gives me "0-9"
Is there a way to get that exact number?
Also, it ignores "a".
Puts "A Distant Soil" under D, "A Walk Through Hell" under W.
Last edited by
pax0707 on 27 Apr 2020, 21:15, edited 1 time in total.
pax0707
Posts: 63 Joined: 25 Jun 2014, 09:44
Post
by pax0707 » 27 Apr 2020, 20:30
rednoah wrote: ↑ 27 Apr 2020, 07:24
e.g. matching the substring before the first number pattern:
Thanks!
So far I got:
Code: Select all
D:/MEDIA/COMICS/SORTED/ENGLISH/{az}/{fn.before(/REGEXHERE/).upperInitial()}/{fn}
(\b(0)\d*\b)|(\b[vV]\d+\b)|(\(\d*\))|(\b[vV][oO][lL]\b)|(#(0)\d*)|(\b[bB][oO][oO][kK]\s\d+)
Still finding some edge cases.
Last edited by
pax0707 on 27 Apr 2020, 23:30, edited 2 times in total.
rednoah
The Source
Posts: 23928 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 27 Apr 2020, 22:03
You can always pick the first letter yourself, if
{az} default behaviour doesn't suit your purpose:
pax0707
Posts: 63 Joined: 25 Jun 2014, 09:44
Post
by pax0707 » 27 Apr 2020, 22:41
rednoah wrote: ↑ 27 Apr 2020, 22:03
You can always pick the first letter yourself, if
{az} default behaviour doesn't suit your purpose:
Thank you!
This worked like a charm.