Page 6 of 11
Re: [SNAP] Grant access to /media
Posted: 26 Sep 2017, 03:54
by ironcity1861
only 25 minutes after a reinstall I realized this is why it wasn't working!
Re: Q&A for n00bs
Posted: 05 Oct 2017, 19:46
by b0ssem
Hey guys,
I have been using Filebot for some time now but only drag and drop style. So now im moving on to the automated worlds. Please bear with me.
I have started off gently by creating a .bat-file that gets run atomatically when my files get extracted by another software im using. So when the extraction is complete is calls the .bat-script and executes the line below.
This is what i have started out with
Code: Select all
filebot -script fn:amc --output "N:\Done" --action copy -non-strict "N:\TV-IN" --log-file amc.log --def skipExtract=y --def excludeList=amc.txt
Kinda simple, nothing fancy. But there is a few things here that im wondering over.
1. Can I define the script to use any of my presets I have made in Filebot? Some of my swedish TV-Shows get named in english. I want them in Swedish. At the moment i have 2 presets.
TV and
Movie.
2. Is it possible to make the script to copy the files directly to
N:\Done\TV Shows. Instead of how its doing now
N:\Done\Tv Shows\ Tvshowname\Season13\
I think that will be good for now.
Thanks in advanced!
Re: Q&A for n00bs
Posted: 05 Oct 2017, 20:10
by rednoah
1.
Yes, you can set custom formats and language preferences via command-line options.
2.
I think you're talking about a custom format that might look something like this:
Re: Q&A for n00bs
Posted: 05 Oct 2017, 21:17
by b0ssem
rednoah wrote: 05 Oct 2017, 20:10
1.
Yes, you can set custom formats and language preferences via command-line options.
2.
I think you're talking about a custom format that might look something like this:
Thanks for you fast reply!
I will check up on the custom formats and language.
Regarding the custom formats, I did a little test and edited my line as you proposed.
Code: Select all
filebot -script fn:amc --output "N:\Done\{plex.name}" --action copy -non-strict "N:\TV-IN" --log-file amc.log --def skipExtract=y --def excludeList=amc.txt
But i got this error when running
Illegal usage: output folder must exist and must be a directory: N:\Done\{plex.name}
Re: Q&A for n00bs
Posted: 05 Oct 2017, 22:42
by rednoah
1.
--output and
--format have distinctively different meanings and functions.
e.g.
Code: Select all
-rename --output N:\Done --format {plex.name}
@see
https://www.filebot.net/cli.html
2.
Since you're using the
amc script, you'll want to read
Change how files will be organized and renamed because you'll need to pass in a custom format for each media type via the
--def <type>Format options.
Re: Batch Rename any type of file
Posted: 06 Oct 2017, 21:22
by dadelayer
Thanks!. I tested it out using the example and it worked fine. However, when I use it with my XML file (I converted the JSON > XML), it says my format is not correct.
I use the same format and code as the example
Re: Batch Rename any type of file
Posted: 07 Oct 2017, 07:42
by rednoah
The example here is very specific. You can learn from it, but you can't copy-and-paste and expect it to work in your case.
If you start by learning how to parse JSON, then you're on the right track:
http://docs.groovy-lang.org/latest/html ... urper.html

You can hire me though, but you'd need to write down exactly what you need, with examples and example data.
Re: Batch Rename any type of file
Posted: 07 Oct 2017, 08:09
by dadelayer
Well, I wanted to try it in XML since I wanted to use your example, but not coming up with anything.
Code: Select all
def fnn = fn
xml = new XmlSlurper().parse(folder+'/mov.xml')
xml.'**'.find { it.name() == 'scid' && it.text() == fnn}*.parent()*.title*.text()
that should return the title but it's not working as its supposed to. I don't have the money to hire :\ it seems expensive

Re: Batch Rename any type of file
Posted: 07 Oct 2017, 10:14
by rednoah
Just debug step by step. Does it parse? Is the first element what you think it should be?
You can prototype and debug these things in the Format Editor in minutes. Just try things and narrow down which exact piece of code isn't working as expected.

Re: [SNAP] Grant access to /media
Posted: 21 Oct 2017, 19:10
by brunorene
I have a NAS mounted using cifs and Im not able to access the files on it... Is that possible?
Im using
/etc/fstab with the config
Code: Select all
//192.168.1.14/nas /media/nas cifs uid=user,gid=user,iocharset=utf8,file_mode=0660,dir_mode=0770,username=username,password=password 0 0
I have already tried --devmode
and
Code: Select all
sudo snap connect filebot:removable-media
sudo snap connect filebot:network
sudo snap connect filebot:network-bind
Regards
Re: Batch Rename any type of file
Posted: 24 Oct 2017, 12:51
by Delmano
This is so useful. Thanks for the tutorial Noah, helps newbies like me a lot.
Re: How about sharing our format expressions?
Posted: 13 Dec 2017, 19:36
by yodaspowart
Have a basic script that uses the groovy setup for 4K content going into its own folder for Movies 4K & TV Shows 4K based on 2160p in file name else it goes to regular folders:
Code: Select all
#!/bin/bash
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
TORRENT_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
TORRENT_NAME="$TR_TORRENT_NAME"
TORRENT_LABEL="N/A"
# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y
filebot -script /opt/filebot/scripts/amc.groovy \
--output "$HOME/media" \
-non-strict --encoding utf8 --log all --log-file amc-transmission.log --action copy --conflict override \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p/ ? 'Movies 4K' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p/ ? 'TV Shows 4K' : 'TV Shows'}/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´''ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Thinking of expanding this to Movies 3D, just need to figure out how to do an "OR".
Re: How about sharing our format expressions?
Posted: 13 Dec 2017, 20:35
by rednoah
Assuming that "3D" is part of the filename, this should do:
Code: Select all
{fn =~ /3D|2160p/ ? 'Movies 4K' : 'Movies'}
Re: How about sharing our format expressions?
Posted: 13 Dec 2017, 21:41
by yodaspowart
Thanks.
This is useful to know that the "OR" can be used like that if i needed to trigger variants for the Folder Movies 4K or Movies 3D.
Was thinking the "OR" could be used like:
IF filename has
3D it goes to folder named
"Movies 3D" (1920x1080P)
IF filename has
2160p it goes to folder named
"Movies 4K" (3840x2160P)
ELSE it goes to folder named
"Movies" (< 1920x1080P)
Would it be this work?
Code: Select all
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : 'Movies'}{fn =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
Thanks rednoah
Re: [SNAP] Grant access to /media
Posted: 14 Dec 2017, 16:55
by pyropunk2006
Any idea how to get filebot to see mounted devices? Its on automount if that makes a difference.
Re: [SNAP] Grant access to /media
Posted: 14 Dec 2017, 19:25
by rednoah
It should work out of the box. What exactly isn't working?
Re: How about sharing our format expressions?
Posted: 14 Dec 2017, 19:28
by rednoah
More like this:
Code: Select all
fn =~ /2160p/ ? 'Movies 4K' : fn =~ /3D/ ? 'Movies 3D' : 'Movies'
You can nest ternary expressions and have lots of if-then-else that way.
Re: How about sharing our format expressions?
Posted: 14 Dec 2017, 22:33
by yodaspowart
Thanks rednoah, this perfect for me!
My new script:
Code: Select all
#!/bin/bash
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
TORRENT_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
TORRENT_NAME="$TR_TORRENT_NAME"
TORRENT_LABEL="N/A"
# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y
filebot -script /opt/filebot/scripts/amc.groovy \
--output "$HOME/media" \
-non-strict --encoding utf8 --log all --log-file amc-transmission.log --action copy --conflict override \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : fn =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p|4K|4k|UHD/ ? 'TV Shows 4K' : 'TV Shows'}/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Re: Exclude Blacklist & Series-Mappings
Posted: 19 Dec 2017, 13:05
by LouisF
Hi rednoah, thanks for the awesome work.
A new series by Amazon is not in tvdb, "Jean-Claude Van Johnson" :
http://www.imdb.com/title/tt6682754/
Am I at the correct place to request this ? Thanks a lot,
Re: Exclude Blacklist & Series-Mappings
Posted: 19 Dec 2017, 15:39
by rednoah
You can go to TheTVDB if you want to add or edit series entries:
https://www.thetvdb.com/
This thread is for adding abbreviations that are not in TheTVDB.
Re: How about sharing our format expressions?
Posted: 25 Dec 2017, 05:03
by jebbe
I am absolutely no expert when it comes doing this, but am slowly learning and not trying to over complicate it for myself.
I mainly use FileBot for movies and nothing else. I've essentially used bits from already posted and kind of made it work for my own needs.
Code: Select all
W:\Movies ({vf})\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
This is what I currently have and is fine but I have all of my movies stored between two different drives labeled Y and W. I saw the snippet of code to tell Filebot to essentially use whichever drive has more free space to decide where to store said movies.
Code: Select all
{['C:', 'D:', 'E:'].collect{ (it+'/TV/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}
I've tried to make this work with my current set up but it comes out weird. I've changed the TV part to movies and what I had for movies but it doesn't seem to work right.
Code: Select all
{['Y:', 'W:'].collect{ (it+'/Movies ({vf})/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
I attempted something like this, but it puts the ({vf}) as part of the movies folder title instead of using the command for the video size and it looks like that snippet has stuff for tv shows.
Anyone mind correcting me on this? I'd appreciate any help I can get to make this right. I also am curious about the drive size code, does it only scan the drives on the initial scan of the movie titles and move them into the same folder or does it take into account each movie as it fills up the drive?
Re: How about sharing our format expressions?
Posted: 25 Dec 2017, 05:13
by jebbe
Literally after sharing this, I tinkered with it a bit more and discovered this.
Code: Select all
{['Y:', 'W:'].collect{ (it+'/Movies') as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()} ({vf})\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
It seems to be working correctly as of right now. Does this look right?
Re: How about sharing our format expressions?
Posted: 31 Dec 2017, 18:48
by Hercules40
I need some help. There are many titles that have question marks in them "?". How do I get the "?" removed from the title?
For example, Anime:
Code: Select all
G:\My Videos\Anime\{n.replace(':',' -').replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replace(':',' -').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
ButI can't get it to work for:
"World End: What do you do at the end of the world? Are you busy? Will you save us?"
Thanks.
Re: How about sharing our format expressions?
Posted: 31 Dec 2017, 20:24
by rednoah
e.g. replace ? with nothing:
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 22:18
by Hercules40
Yeah, I get that. And of course, instead of the title "t", I need to change the name "n". So, I tried this expression, but can anyone tell me why it doesn't work?
Code: Select all
\Anime\{n.replace(':',' -').replace('?','').replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replace(':',' -').replace('?','').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 22:41
by rednoah
It works. Why would you think that it doesn't work? What results do you get?
Test Case:
Code: Select all
{'Is this a test?'.replace('?', '')}
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 23:55
by kim
Look at your output:
/Anime/World End - What Do You Do at the End of the World Are You Busy Will You Save Us/Season 1/World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us? - 1x12 - The Happiest Girl in the World
this is easier to see like so
/Anime/ = folder
World End - What Do You Do at the End of the World Are You Busy Will You Save Us = n (folder)
/
Season 1 = folder
/
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us? = n (filename)
-
1x12 = s00e00 / sxe.pad(2)
-
The Happiest Girl in the World = t
for every n (folder or filename) of t you need to remove/replace e.g. '?' from the full path, you see ?
Code: Select all
{n.replace(':',' -').replaceAll(/[?]/).replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceAll(/[?]/).replaceTrailingBrackets()} - {sxe.pad(2)} - {t.replace(':',' -').replace('?','').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
https://www.thetvdb.com/?tab=episode&se ... 3518&lid=7
btw:
this only removes e.g. ? if this is the last char in n e.g.
before
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us?
after
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us
https://regexr.com/
Re: Metadata and Extended Attributes
Posted: 07 Jan 2018, 12:58
by oneguynick
Code: Select all
filebot -rename *.mp4 --db TVDB -non-strict
Illegal Argument: java.nio.file.InvalidPathException: Illegal char <*> at index 0: *.mp4 (*.mp4)
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
^C
Example filename: Penoza - S01E02 - Unpleasant Surprises HDTV-720p.mkv
Re: Metadata and Extended Attributes
Posted: 07 Jan 2018, 13:08
by rednoah
*.mp4 refers to all mp4 files. If you're testing with mkv files then *.mkv will select those.
@see
https://mywiki.wooledge.org/glob
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 10:36
by oneguynick
My mistake. I forgot they were *.mkv, good catch. With that said I am now testing the same working commands against my samba share with the same issue. Copy locally just isn't an option. Is there a better way to do this? NFS or SFTP or something?
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 10:58
by oneguynick
Alright so I took the network share out of the picture for troubleshooting and tried docker:
Code: Select all
docker run -it -v /tv:/volume1 -v /opt/docker/filebot:/data rednoah/filebot -script fn:xattr -r *
docker run -it -v /tv:/volume1 -v /opt/docker/filebot:/data rednoah/filebot -script fn:duplicates -r --action test *
Done ヾ(@⌒ー⌒@)ノ in both cases. I specifically copied a folder of shows to ensure there were exact duplicates.
I had considered that maybe it was the ZFS pool. I verified the pool is enabled for xattr:
Code: Select all
NAME PROPERTY VALUE SOURCE
share xattr on default
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 17:03
by rednoah
NFS might work. SFTP probably doesn't preserve attributes, but RSYNC might
(with --xattrs option).
If you're using docker with some host folder mounted into the docker, then there's a good chance xattr won't work. I remember filesystem events not working either. Not sure if that's something that can be enabled or if it's just not supported.

If you care about xattr, then the best solution is usually to process files on the NAS or server where reading/writing xattr usually works out of the box.

FileBot generally doesn't require xattr, it just stores some xattr info if possible, but will work just fine without. It's just that the
duplicates script requires them to work, so it'll instantly know which file is which movie/episode without having to bother any web services.
Re: [SNAP] Grant access to /media
Posted: 12 Jan 2018, 18:59
by brunorene
All folders outside my home directory are greyed out and I cannot select them in order to process their contents
Re: [SNAP] Grant access to /media
Posted: 13 Jan 2018, 10:23
by rednoah
SNAP package are confined to your files by default, and
/media if you
snap connect filebot:removable-media.

Please provide screenshots and the absolute paths of some of the files that don't work.

The SNAP developers are probably the best source for advice in this case.
Re: Batch Rename any type of file
Posted: 06 Feb 2018, 05:18
by yhm28
rednoah wrote: 13 Oct 2014, 21:47
3. Now that
New Names has focus hit
F2
Is there any way to remap the shortcut to a different key?
Re: Batch Rename any type of file
Posted: 06 Feb 2018, 08:39
by rednoah
No, but for reoccurring tasks I recommend making a Preset.
Presets can be called via the number keys or numpad keys.
Re: Fetch Artwork and Nfo for TV Shows
Posted: 12 Mar 2018, 16:08
by SHJordan
rednoah wrote: 06 Jan 2012, 11:46
Description:
- Download artwork for all your TV Shows from TheTVDB. Fetch tvshow nfo, series and season artwork and save files according to XBMC standards.
- Disable confirmation dialogs via -non-strict option (on headless machines this is the default).
Usage:
Code: Select all
filebot -script fn:artwork.tvdb /path/to/tvshows/
Options:
--q name to force search query manually instead of auto-detection
--conflict override to fetch artwork from scratch and not just missing artwork
-non-strict to disable user-interaction and run headless
Notes:
- Episodes are expected to be organized into Show/Season N/Episode XY structure. The TV Show will be auto-detected from files and the folder structure.
i'm trying to write a drag'n'drop bat file for some shows that need to get names with spaces such as "Pop Team Epic"
which regularly would only get TEAM... but i'm failing to get the dragged folder PATH.
Here is what i got so far:
Code: Select all
for %%a in (.) do set currentfolder=%%~na
echo %currentfolder%
filebot -script fn:artwork.tvdb %1 --q '%currentfolder%'
timeout /t -1
Can you take a look? or give some tips?
Re: How about sharing your CLI scripts?
Posted: 12 Mar 2018, 18:39
by kim
It's not clear what the problem is and you need to give a sample (with full file path) to test with
?
Code: Select all
for %%a in (%1) do echo %%~nxa
for %%a in (%1) do echo %%~na
Re: Fetch subtitles for all files
Posted: 20 Mar 2018, 17:07
by darkvinill
rednoah wrote: 02 Apr 2014, 10:30
Description:
If you want to download subtitles for more than just a single folder then
-get-subtitles -r in one batch with many many files can be a bad bad idea. This script will fetch subtitles folder per folder to make fetching large amounts of subtitles more reliable. Files may be included or excluded based on file creation date, last modified date, file size, video length, embedded subtitles, etc

If you call this script repeatedly on the same folders or files then you MUST SET
--def maxAgeDays to 30 days or less and call it no more than once per day.
Fetch subtitles for all files that have recently been created:
Code: Select all
filebot -script fn:suball /path/to/media -non-strict --def maxAgeDays=7
Fetch subtitles for all files:
You must not lookup subtitles for all files repeatedly in any kind of automated setup, or you will get banned. If you use the suball script in an automated setup then you MUST SET --def maxAgeDays to 30 days or less.
Code: Select all
filebot -script fn:suball /path/to/media
Files will be ignored and excluded from processing if one of the following conditions holds true:
- file path matches your --def ignore pattern
- time passed since file last-modified date is more than --def maxAgeDays
- time passed since file last-modified date is less than --def minAgeDays
- file size is less than --def minFileSize
- video duration is less than --def minLengthMS
- video file already contains embedded subtitles in a language matching your --def ignoreTextLanguage pattern (by default, if files contain subtitles of any language, no additional subtitles will be downloaded)
Options:
--lang zho set preferred subtitle language
(default: eng)
--def maxAgeDays=7 set a max-age for files that will be processed, older files will be ignored
--def minAgeDays=1 set a min-age for files that will be processed, newer files will be ignored (so better subtitles can be downloaded later)
--def minFileSize=0 set a minimum file size, smaller files will be ignored
(default: 50 MB)
--def minLengthMS=0 set a minimum video duration, shorter videos will be ignored
(default: 10 min)
--def ignore=regex set an ignore pattern for paths that should be ignored
--def ignoreTextLanguage=regex set an ignore pattern for video files that already contain embedded subtitles in certain languages
(default: .+)
Ho is this script different from the one that comes with filebot ?
Re: How about sharing your CLI scripts?
Posted: 20 Mar 2018, 17:51
by rednoah
The suball script gives you lots of extra options. It's built on top of simple -get-subtitles calls, by selecting files and making calls as necessary to make processing large batches of files more manageable.
Re: FileBot for Windows 7 and Windows Server
Posted: 24 Mar 2018, 01:23
by crisavec
Hello,
I have in the past contributed atleast 2 donations for filebot, and was wondering how to go about gaining access to the private builds. I am currently still running win7, with no plans to move to win10 until cannon lake desktop chips are stable.
Re: FileBot for Windows 7 and Windows Server
Posted: 24 Mar 2018, 01:47
by rednoah
Please PM me your previous donation details and make me an offer.
EDIT:
2 recent donations that barely cover the price of the Microsoft Store retail version, is not enough for extended support custom builds. These builds are intended for companies or professional users that know the value of software and don't blink twice about 2-3 digit EUR software licenses.
Re: Batch Rename any type of file
Posted: 29 Mar 2018, 15:18
by ooga123459
This is great! Exactly what I was looking for, thanks much

Re: [Mac] brew cask install filebot
Posted: 05 Apr 2018, 11:21
by raymond
rednoah wrote: 08 Oct 2014, 10:21
3. Install Java:
With current version of brew this will install java9. filebot uses java8. I suggest this should now be
Re: Presets
Posted: 15 Apr 2018, 06:35
by DarfNader
So what does "Do select files" and "Use orignal files" selection actually do differently? I think I missed that explanation.
Re: Presets
Posted: 15 Apr 2018, 06:37
by DarfNader
Also, it doesn't look like you can enable "hidden" folders in the file selector in "Input Folder" and "Includes" when trying to set up a preset.
Re: Presets
Posted: 15 Apr 2018, 06:49
by rednoah
Original Files means that you load in your own files via Drag-n-Drop and the the Preset is applied to whatever files you have already loaded into FileBot.
Do select files will give you additional input fields, so you can do things like "Load all *.mkv files from D:/Downloads/Movies and then process them with TheMovieDB" so you don't have to drag the files into FileBot yourself every time.
Hidden files / folders are indeed ignored by default. The Filter option can only be used to Filter out files (e.g. non-mkv files) but it cannot be used to "filter in" files. If you have files in a hidden folder, then you can specify that folder directly, and then load all the non-hidden files within that folder into FileBot.
Re: [Mac] brew cask install filebot
Posted: 22 Apr 2018, 20:55
by cheaters

Since Apple does not allow command-line tools in the Mac App Store you will need to install the filebot console tools via brew even if you have already bought FileBot from the App Store.
Does installing the FileBot package using brew write over the AppStore Version? I notice it's installing into the Applications folder.
Re: [Mac] brew cask install filebot
Posted: 23 Apr 2018, 06:18
by rednoah
No. Not if you follow the instructions above:
Code: Select all
brew cask install filebot --force --appdir=~/Applications
Re: [Mac] brew cask install filebot
Posted: 04 May 2018, 13:17
by RafaelSantos
Hi, I have the Mac App Store Filebot and would like to install the command line tool, but I don't really want to install brew (I already have MacPorts). Is there any alternative? Is it possible to download the standalone filebot.jar file to run command line applications? Thanks.
Re: [Mac] brew cask install filebot
Posted: 04 May 2018, 13:21
by rednoah
You can make it work manually by reading and understanding the brew cask formula, and then just download / extract / symlink things yourself as necessary:
https://github.com/caskroom/homebrew-ca ... filebot.rb
Re: [Mac] brew cask install filebot
Posted: 16 May 2018, 16:57
by jp4500
Hi,
I installed successfully and ran the test and curious about something I see in the results:
- It says `UPDATE AVAILABLE: FileBot 4.8 (r5280)` but I did get the latest AFAIK. Is there another way to update?
Code: Select all
~/Downloads$ filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_172
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 15 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin macbook-air.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
-------------------- UPDATE AVAILABLE: FileBot 4.8 (r5280) ---------------------
Done ヾ(@⌒ー⌒@)ノ
(NOTE: I had to uninstall java 9 and install java 8 to fix some WARNING's that showed up originally)
Re: [Mac] brew cask install filebot
Posted: 16 May 2018, 17:24
by rednoah
There is indeed no update for the CLI, but unfortunately the update notification code doesn't have support for different platforms having different latest revisions.
Re: Discord / Slack / IRC Channel
Posted: 21 May 2018, 14:09
by Manalo
Is the Discord channel more active than the forums at this point? I don't have it yet, but I'll install it if the community has moved there.
Re: Discord / Slack / IRC Channel
Posted: 21 May 2018, 15:01
by rednoah
The forums are the best way to ask for help. Also, because Google will be able to find results from the forums. Discord is just for fun if you want to talk to someone in real time.
Re: [Anime] Convert Absolute to SxE numbers
Posted: 30 May 2018, 04:15
by james
I registered specifically to thank you for this. Thank you!
Re: [GUIDE] How to install FileBot on Debian Linux
Posted: 31 May 2018, 20:20
by DarkVodka34
root@Media-Server:~/Downloads# sudo dpkg -i filebot.deb
dpkg-deb: error: `filebot.deb' is not a debian format archive
dpkg: error processing filebot.deb (--install):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
filebot.deb
Any ideas why?
Re: [GUIDE] How to install FileBot on Debian Linux
Posted: 01 Jun 2018, 08:55
by rednoah
This thread is outdated. The links above have not existed for a long time, so you have probably downloaded an HTML error page. You can use cat *.deb to check.
You can download the most recent deb package from the SF.net download section.
macOS cli license
Posted: 20 Jul 2018, 03:26
by rico
I installed from the Apple App Store and the GUI works fine.
I'm trying to get the cli working, but am having trouble getting it registered. I run
and what appears to be the same GUI interface pops up and proclaims, as does the command line,
I've searched for this `psm` file, but haven't located it. Please help!
Re: [Mac] brew cask install filebot
Posted: 20 Jul 2018, 12:05
by rednoah
TL;DR If you want to use the CLI, then you will need to ask Apple to refund your purchase ASAP, and purchase an FileBot cross-platform license instead.
1.
The Mac App Store does not support / allow command-line tools:
viewtopic.php?f=12&t=5983

The MAS version does not have a CLI.
2.
You seem to have installed
[BETA] FileBot 4.8.2 (with support for all platforms with cross-platform license system) which is completely different and licensed separately from the Mac App Store version.

This version requires a license file and is completely separate from the Mac App Store. You will not be able to use your MAS purchase to unlock the non-MAS version of FileBot.
Re: [Mac] brew cask install filebot
Posted: 20 Jul 2018, 14:49
by rico
Thank you for your response. I'll do as you suggest.
Re: [Mac] brew cask install filebot
Posted: 20 Jul 2018, 14:58
by rico
The return went fine, but how do I purchase the CLI/cross-platform license? I installed it via homebrew per this thread.
Re: [Mac] brew cask install filebot
Posted: 20 Jul 2018, 17:37
by rico
I found the link in another thread:
https://www.filebot.net/purchase.html#spk.
It works, now!
Re: Installing FileBot on QNAP NAS
Posted: 21 Jul 2018, 18:11
by eury
Hi,
I installed Filebot but it doesn't open. What needs to be done ?
Re: Installing FileBot on QNAP NAS
Posted: 21 Jul 2018, 19:04
by rednoah

What do you expect to happen when you click
Open?

The FileBot package will install the
filebot command-line tool. You have to login via SSH to run commands.

Re: Conditional Structures (if-then-else)
Posted: 25 Jul 2018, 22:46
by hansooloo
How can I actually write an if-then-else?
e.g.,
IF movie is part of a collection
name it `collection/plex`
ELSE
name it `plex`
If I use this
Code: Select all
{if (collection != null) {collection/plex} else {plex}}
I get this
Code: Select all
ExpressionException: No signature of method: java.lang.String.div() is applicable for argument types: (File) values: [Movies/The Purge (2013)/The Purge (2013)]
Possible solutions: div(java.lang.String), is(java.lang.Object), wait(), trim(), size(), find()
Re: Conditional Structures (if-then-else)
Posted: 26 Jul 2018, 01:17
by rednoah
1.
If you just want to add the collection in front of the plex path, then you don't need if-then-else:
If you want a default value if collection is undefined, the I'd write something like this:
Code: Select all
{any{collection}{'No Collection'}/{plex}
You can't check if
collection == null because of the
The Unwind-on-Undefined Behaviour, meaning collection is never null, it's either not null, or it crashes the
{expression}.
2.
However, the error message you posted is completely unrelated to if-then-else and just tells us that we can't use the / operator between a String object and a File object.
Re: FileBot on the Mac App Store
Posted: 26 Jul 2018, 17:34
by brocagel
I bought filebot on mac appstore, 29EUR.... to discover now that some features are missing like subtitle management, and that I need to buy new licence ; I just try to find on your download page another way to donwload app except Mac or Windows store ; sounds impossible or at least non obvious
I feel...defrauded clearly
will for sure inform others on both stores
Re: FileBot on the Mac App Store
Posted: 26 Jul 2018, 17:59
by rednoah
1.
You can ask Apple / Microsoft for a refund if you're not happy with the product. Not much I can do if Apple decided not not allow subtitle tools some 2 years ago. The Windows Store version is fully featured.
2.
FileBot 4.8.2 (early access, in beta, not officially released yet) requires a license for the rename feature only. If you use it just for OpenSubtitles, then that'll work even without purchasing a license. The
FileBot Subtitles for Mac is still available, but deprecated.
Re: FileBot on the Mac App Store
Posted: 26 Jul 2018, 18:13
by brocagel
Hi, thanks for the answer - product is ok anyway ; regarding subtitles I found FlixTools... magic
Regards
Re: FileBot on the Mac App Store
Posted: 27 Jul 2018, 09:16
by rednoah
For subtitles, I do recommend purchasing FlixTools, as it's made by the creators of OpenSubtitles, and thus supports the site as well as the app.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Posted: 07 Aug 2018, 10:01
by otr
I would like to ask for help with this. I'll put this in a way so that it may help others in the future as well.
My setup: DS218play, jDownloader headless + my.jdownloaderorg as GUI + filebot.
This is a screen capture of the GUI that I have. I fail to enter the scripts (e.g.
https://github.com/filebot/plugins/blob ... inished.js) via c&p (plus modifying path) into that window. I get an error (failed to set new value).
My question: Is that even the right way? Or do I need to follow the headless path that you describe above?
In that case,
- where do I put that script?
- can you provide the second script as JSON as well please? The provided one only works for "ON_PACKAGE_FINISHED", but not for ArchiveExtracted.
Thanks!
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Posted: 07 Aug 2018, 10:21
by rednoah
I've never used the JD WebUI. It looks very basic. I guess it's just a simple interface so you can write the
org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json configuration file.
You can try to just copy the raw JSON:
https://github.com/filebot/plugins/blob ... ripts.json
The easiest way is probably to log in via SSH, find the configuration files, and then write them directly, and restart JD:
Code: Select all
find /volume1 -iname '*EventScripterExtension*'

You can use the JD desktop app and setup Event Scripter that way, and the just copy the configuration file.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Posted: 09 Aug 2018, 21:00
by hansooloo
Take a look at this shell script I created for my setup where I was running into the exact same issue:
https://gist.github.com/HanSooloo/89528 ... 2668b0330e
You _will_ need the `jq` package, which is readily available on both macOS (via brew) or any Linux distribution.
Re: Exclude Blacklist & Series-Mappings
Posted: 12 Aug 2018, 13:14
by plittlefield
Can you please add "Tangled the Series" mapped to "Rapunzel's Tangled Adventure" ?
Re: Exclude Blacklist & Series-Mappings
Posted: 12 Aug 2018, 13:17
by rednoah
Added.
Re: [DEB] Debian package
Posted: 15 Aug 2018, 22:12
by jbuck79
I'm getting the following when updating my sources on Ubuntu 18.04. Anyone else? Is there something I need to do to fix it?
Code: Select all
W: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://get.filebot.net/deb stable InRelease' does not seem to provide it (sources.list entry misspelt?)
Re: [DEB] Debian package
Posted: 16 Aug 2018, 06:24
by rednoah
Sorry, 32-bit Linux (i386) is not supported. You'll need to install 64-bit Linux (amd64 / x86_64) since the Debian package is only available for this architecture. Why are you still using 32-bit Linux? Is there any particular reason?

The Portable TAR package can work on armv7l / aarch64 / i386 / amd64 so you might want to consider that if you're stuck on 32-bit Linux for some reason.
Re: [FAQ] How do I activate my license?
Posted: 16 Aug 2018, 10:02
by satori83
I purchased the regular mac app, not through store. I have tried double clicking, opening with app, even uninstalling and reinstalling the app but the app will not register. I am guess thats why its not recognizing recent popular movies that just need to be cleaned up a little bit...because the old version I used to use handled the simple plex scheme fine.
Re: [FAQ] How do I activate my license?
Posted: 16 Aug 2018, 10:19
by rednoah
satori83 wrote: 16 Aug 2018, 10:02
I purchased the regular mac app, not through store. I have tried double clicking, opening with app, even uninstalling and reinstalling the app but the app will not register. I am guess thats why its not recognizing recent popular movies that just need to be cleaned up a little bit...because the old version I used to use handled the simple plex scheme fine.
What does "not register" mean? FileBot is crashing on startup? License activation not working? Some other error when you try to process files?
Please share screenshots so I can see what you see:
https://snag.gy/
Re: [DEB] Debian package
Posted: 16 Aug 2018, 23:02
by jbuck79
I'm using a 64-bit version of Ubuntu. Here is my output of 'uname -a'.
Code: Select all
Linux fileserver 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Re: [FAQ] How do I activate my license?
Posted: 17 Aug 2018, 02:29
by satori83
For some reason when I just went to record what happens, it activated! Good to go now, thanks.
Re: [DEB] Debian package
Posted: 17 Aug 2018, 04:13
by rednoah
Strange. I guess you can ignore the i386 packages warning then as it's not particularly relevant to your amd64 machine.
Maybe setting
arch=amd64 will make the warning go away:
Code: Select all
deb [arch=amd64] https://get.filebot.net/deb/ stable main
Re: [FAQ] How do I activate my license?
Posted: 17 Aug 2018, 04:31
by rednoah
Strange. Could have been temporary server-side issues, though I don't see anything odd in the logs. If something doesn't work in the future, and there's an error, message, just make a quick screenshot so we see what's going on and troubleshoot.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Posted: 17 Aug 2018, 12:10
by otr
Hi,
sorry for being silent for a bit, I have been on a short trip. In the meantime, my setup is now working and I wanted to report back my specifics, so that others may benefit, but also so that I can learn in case I have missed something important.
This is what is working for me:
1. jDownloader Event Scripter calls this script
Code: Select all
[{"eventTrigger":"ON_PACKAGE_FINISHED", "enabled":true, "name":"FileBot", "script":"var amcFile = '/volume1/Downloads/jdtofilebotv2.sh';var path = '/volume1/Downloads/'; callAsync(function() {}, amcFile, path);", "eventTriggerSettings":{}, "id":123654}]
For people that were new to this, just like me:
- The above is the exact "text" that you can see in the jDownloader UI. Compare this screenshot:
https://snag.gy/kYHCEN.jpg
- id:123654 is a random number I thought of. The way I understand it this is the ID the process runs under and I would be able to find it under this ID, if I had to look for it.
2. the jdtofilebotv2.sh script that is called above
Code: Select all
#!/bin/sh
export JAVA_OPTS="-Xmx256m"
/var/packages/filebot/target/filebot.sh -script 'fn:amc' /volume1/Downloads --output /volume1/Media/ --conflict auto --lang en --def 'clean=y' 'skipExtract=y' 'excludeList=.excludes'
I would be happy to get comments on this, especially since people later might look at this and assume that I did smart things (I did not - I just figured out what works for me somehow).
One issue I have is that I still do not find the filebot log file created by this setup.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Posted: 17 Aug 2018, 20:03
by rednoah
1.
filebot should work just fine instead of /var/packages/filebot/target/filebot.sh but should you need an absolute path for some reason, then /usr/local/bin/filebot is recommended.
2.
-non-strict is generally used in all my examples, since strict mode tends to be too strict for what people use the amc script for usually.
3.
--log-file /path/to/log is recommended so you know exactly where the FileBot log is. This option will make sure that logs are written to both console and file.
Re: [DEB] Debian package
Posted: 17 Aug 2018, 23:44
by jbuck79
That seems to have resolved it. Thanks.
Re: Exclude Blacklist & Series-Mappings
Posted: 20 Aug 2018, 21:49
by lordCONAN
Hey, it's been a long time since my last post ...
Could you please map survivor.au to Australian Survivor, the auto-detect sets it to american survivor by default ...
Re: Exclude Blacklist & Series-Mappings
Posted: 21 Aug 2018, 04:24
by rednoah
Sure. Can you please post an example file path for testing?
Re: Exclude Blacklist & Series-Mappings
Posted: 21 Aug 2018, 07:33
by lordCONAN
Here's a sample filename
Code: Select all
survivor.au.s05e09.hdtv.x264-fqm.mkv
And this is the current output from it
Code: Select all
Parameter: ut_title = Survivor.AU.S05E09.HDTV.x264-FQM
Parameter: ut_kind = multi
Parameter: ut_file =
Parameter: ut_dir = D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM
Read archive [survivor.au.s05e09.hdtv.x264-fqm.rar] and extract to [D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm\Survivor.AU.S05E09.HDTV.x264-FQM]
Extracting files [D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm.mkv]
Input: D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm.mkv
Group: [tvs:survivor] => [survivor.au.s05e09.hdtv.x264-fqm.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Survivor, survivor au]
Fetching episode data for [Survivor]
Fetching episode data for [#Survivor]
Fetching episode data for [Survivor (UK)]
Fetching episode data for [Survivor (BG)]
Fetching episode data for [Survivor (TR)]
Fetching episode data for [Survivor (GR)]
[COPY] From [D:\Completed\tv shows\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm\Survivor.AU.S05E09.HDTV.x264-FQM\survivor.au.s05e09.hdtv.x264-fqm.mkv] to [F:\TV Shows\Survivor\Survivor Season 05\Survivor S05E09 - Desperate Measures.mkv]
Processed 1 files
Thanks
Re: Exclude Blacklist & Series-Mappings
Posted: 21 Aug 2018, 07:59
by rednoah
It seems
Australian Survivor (2002) has already been added as alias name upstream on TheTVDB.
Works for me right out of the box:
Code: Select all
Input: …/Survivor.AU.S05E09.HDTV.x264-FQM.mkv.mp4
Group: [tvs:survivor au] => [Survivor.AU.S05E09.HDTV.x264-FQM.mkv.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Survivor AU]
Fetching episode data for [Australian Survivor]
…
[TEST] from […/Survivor.AU.S05E09.HDTV.x264-FQM.mkv.mp4] to […/TV Shows/Australian Survivor/Season 05/Australian Survivor - S05E09 - Episode 9.mp4]
…
Re: Exclude Blacklist & Series-Mappings
Posted: 21 Aug 2018, 09:10
by lordCONAN
Fixed it. It was totally my fault, I had 2 versions of filebot installed, an old one that was still being picked up as the default version, and the new windows store version, uninstalling the old version fixed everything for me. Sorry for time spent testing. Feel free to delete these posts to help keep this thread clean.
Re: Exclude Blacklist & Series-Mappings
Posted: 21 Aug 2018, 09:11
by rednoah
No worries. Let me know if you run into any other issues. Just make sure to include sample file paths so I can run my own tests.
Re: How about sharing our format expressions?
Posted: 29 Aug 2018, 14:08
by dpullen87
Hi DevXen,
I'd really appreciate it if you could send me your music script for MusicBrainz
Many Thanks,
Re: Presets
Posted: 02 Sep 2018, 15:59
by RobEh
I am wondering how to add a leading 0 to the season using 1x01 naming format to come out as 01x01? Simply adding a 0 in front of the expression will not work as season 10 would show as season 010.
EDIT:
I found it on my own

:
Regards,
Re: [FAQ] How do I activate my license?
Posted: 05 Sep 2018, 18:35
by ZeroDown
I think my license was blocked by outlook. Is there anyway to resend it to a gmail account?
Re: [FAQ] How do I activate my license?
Posted: 05 Sep 2018, 18:50
by rednoah
Possibly. Please PM me your name / email.
Re: [FAQ] How do I activate my license?
Posted: 05 Sep 2018, 20:07
by angryunibrow
How long does it take to receive the emails?
I purchased through PayPal and have yet to receive any emails regarding my license.
Nevermind, I see and have replied in the other thread reagrding the slow license issue rollout.
Re: [FAQ] How do I activate my license?
Posted: 05 Sep 2018, 22:23
by exper2123
Good evening, first of all, congratulations for this superb program which has greatly facilitated my daily life.
however I have a problem, I bought filebot on the microsoft store under windows 10 (directly activated after installation) on March 28th and I would like to install filebot also on my mac (macosx), but apart from a microsoft email with the invoice of my purchase, I have no trace of any email with a license.
Could you do something, please?
Thank you in advance
Translated with
www.DeepL.com/Translator
Re: [FAQ] How do I activate my license?
Posted: 06 Sep 2018, 04:12
by rednoah
Everything is up and running again:
https://new.paddle.com/
Please let me know if you still haven't received your license.