Q&A for n00bs
-
- Posts: 5
- Joined: 07 Apr 2017, 01:19
Process without --db ??
Is it possible to process files without the use of a database?
All I'm trying to do is organize a flat folder into sub-directories: e.g.
$:~/Movies> tree
.
├── Video - 01.mp4
├── Video - 02.mp4
├── Video - 03.mp4
├── Video - 04.mp4
└── Video - 05.mp4
Would be processed and become:
$:/mnt/data/test> tree
├── 480x270
│ └── Video - 03.mp4
├── 640x360
│ └── Video - 04.mp4
└── 960x540
├── Video - 01.mp4
├── Video - 02.mp4
└── Video - 05.mp4
I can accomplish this with:
$:~/filebot.sh -script fn:amc ./ --output "/mnt/data/sorted" --action copy --conflict auto --def "movieFormat={resolution}/{fn}"
but it pointlessly tried to identify/match the files.
I also tried:
filebot.sh -rename . --db xattr --action copy --format {resolution}/{fn}
which returns:
Rename files using [Extended Attributes]
Failed to identify or process any files
Failure (°_°)
All I'm trying to do is organize a flat folder into sub-directories: e.g.
$:~/Movies> tree
.
├── Video - 01.mp4
├── Video - 02.mp4
├── Video - 03.mp4
├── Video - 04.mp4
└── Video - 05.mp4
Would be processed and become:
$:/mnt/data/test> tree
├── 480x270
│ └── Video - 03.mp4
├── 640x360
│ └── Video - 04.mp4
└── 960x540
├── Video - 01.mp4
├── Video - 02.mp4
└── Video - 05.mp4
I can accomplish this with:
$:~/filebot.sh -script fn:amc ./ --output "/mnt/data/sorted" --action copy --conflict auto --def "movieFormat={resolution}/{fn}"
but it pointlessly tried to identify/match the files.
I also tried:
filebot.sh -rename . --db xattr --action copy --format {resolution}/{fn}
which returns:
Rename files using [Extended Attributes]
Failed to identify or process any files
Failure (°_°)
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
-non-strict allows you to process files that are not xattr tagged:
@see viewtopic.php?f=4&t=4788
Code: Select all
filebot -rename *.mp4 --action duplicate --db xattr -non-strict --format {resolution}/{fn}
-
- Posts: 5
- Joined: 07 Apr 2017, 01:19
Re: Q&A for n00bs
Really!?!?! that's all I was missing. I thought -non-strict was just for oddly named files.
Learn something new everyday. Your next beer is on me via paypal.
Learn something new everyday. Your next beer is on me via paypal.
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
-non-strict has different meanings in different contexts. If you're using --db xattr with -non-strict then -non-strict refers to not strictly processing only xattr tagged files.
-
- Posts: 5
- Joined: 07 Apr 2017, 01:19
Re: Q&A for n00bs
Makes sense. Thanks for your help. I spent the better part of the day trying to make that little one-liner work.
-
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
I apologize in advance if this is an easy fix!
So pretty frequently I'm getting a "file is being used" error when uTorrent runs my post-download amc script. To remedy this for now, I've created a scheduled task to run my sort command, to scoop up any files that the post-download script couldn't immediately grab.
My issue is that even if the rename/file transfer errors out with "file is being used", the filename is being written to the exclude list.
So the question is, am I able to setup the script so if Filebot errors out on a file, that file is NOT added to the exclude list?
If that is not possible, is it possible to run the uTorrent post-download script WITHOUT --def excludeList? The scheduled task would still have --def excludeList. Haven't removed that line because of your indication that frequent repeats would constitute a ban from the script.
Thanks so much!
If it helps any, here are my 2 scripts:
uTorrent post-download
Scheduled task
So pretty frequently I'm getting a "file is being used" error when uTorrent runs my post-download amc script. To remedy this for now, I've created a scheduled task to run my sort command, to scoop up any files that the post-download script couldn't immediately grab.
My issue is that even if the rename/file transfer errors out with "file is being used", the filename is being written to the exclude list.
So the question is, am I able to setup the script so if Filebot errors out on a file, that file is NOT added to the exclude list?
If that is not possible, is it possible to run the uTorrent post-download script WITHOUT --def excludeList? The scheduled task would still have --def excludeList. Haven't removed that line because of your indication that frequent repeats would constitute a ban from the script.
Thanks so much!
If it helps any, here are my 2 scripts:
uTorrent post-download
Code: Select all
filebot -script fn:amc --output "D:\Plex" --action move --conflict skip -non-strict --log-file amc.log --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" excludeList=amc.txt movieFormat="D:/Plex/Movies/{fn}" seriesFormat="D:/Plex/TV/{fn}"
Code: Select all
filebot -script fn:amc --output "D:\Plex" --action move --conflict skip -non-strict "C:\Users\username\Downloads" --log-file amc.log --def excludeList=amc.txt movieFormat="D:/Plex/Movies/{fn}" seriesFormat="D:/Plex/TV/{fn}"
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
1.
You can't use --action move on files that are being seeded. My recommendation is to use --action duplicate and to make sure that input/output folder are on the same drive (i.e. your Downloads and Plex folder should be on Drive D:) so that it can create hardlinks instead of having to physically copy the data from one drive to another.
You want to seed files and you want to create an additional file entry (i.e. hardlink) in your Plex folder. That is not a problem. You can have the same file twice (or many times) without using any extra disk space.
@see https://en.wikipedia.org/wiki/Hard_link#Example
2.
If you're using {fn} as format, then I see no reason to use FileBot or the amc script at all actually. There's simpler tools for just moving files into folders. You're using a space ship when you should be using a tractor.
If you use Plex on your Plex folder, Plex will definitely not be happy with a flat folder of completely and utterly unorganized files. 
Are you sure you know what {fn} means?
You can't use --action move on files that are being seeded. My recommendation is to use --action duplicate and to make sure that input/output folder are on the same drive (i.e. your Downloads and Plex folder should be on Drive D:) so that it can create hardlinks instead of having to physically copy the data from one drive to another.
You want to seed files and you want to create an additional file entry (i.e. hardlink) in your Plex folder. That is not a problem. You can have the same file twice (or many times) without using any extra disk space.
@see https://en.wikipedia.org/wiki/Hard_link#Example
2.
If you're using {fn} as format, then I see no reason to use FileBot or the amc script at all actually. There's simpler tools for just moving files into folders. You're using a space ship when you should be using a tractor.




-
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
Thanks for the reply!
I'm using Filebot because I couldn't find a tool to accurately sort Movies/TV Shows on Windows. On Mac, I had a Folder Action set up that performed this nicely (with few errors, it searched the filename for S**E**)
I just have 2 Plex libraries, one at D:\Plex\Movies & one at D:\Plex\TV.
I'm using Filebot because I couldn't find a tool to accurately sort Movies/TV Shows on Windows. On Mac, I had a Folder Action set up that performed this nicely (with few errors, it searched the filename for S**E**)
Plex doesn't seem to mind unorganized files just sitting in their TV/Movie folder...at least, as far as I can tell!If you use Plex on your Plex folder, Plex will definitely not be happy with a flat folder of completely and utterly unorganized files.

Yes, using {fn} because I didn't see a need to rename the files.Are you sure you know what {fn} means?
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
Plex is very explicit about how files must be organized:Plex wrote:It's important that your media files and library folders are named and organized
https://support.plex.tv/hc/en-us/catego ... reparation
You're either insanely lucky, or you just haven't seen much yet.kindofblue91 wrote:Yes, using {fn} because I didn't see a need to rename the files.

-
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
Oh jeez, my TV library would probably give you a hernia, then! My thought process was that once Plex has indexed the library, it wouldn't really care that all episodes aren't grouped in a series-named sub-folder



- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
Sure, but to correctly index your library, it needs to make sense first. With flat files like this, it might work sometimes, maybe even most of the time, but certainly not all the time. 

-
- Posts: 1
- Joined: 23 Apr 2017, 22:02
syntax error near unexpected token `('
Command:
Error:
-script fn:sysinfo
I'm pulling my hair out with this. I really could use an extra set of eyes on my script call.
Code: Select all
filebot -rename *.mkv --output /mydir --format {n}/{episode.special ? "Specials" : "Season "+s.pad(2)}/'{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}' --db TheTVDB
Code: Select all
syntax error near unexpected token `('
Code: Select all
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.73
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-04-03 (r494)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_65
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 224 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
Package: DEB
Data: /---/---/.filebot
uname: Linux ---4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
-
- Posts: 1
- Joined: 02 Aug 2017, 09:02
Re: Q&A for n00bs
I'm having an issue with running this through powershell, it simply picks the first hit on a movie, the same applies for series.
Is there any way for me to either let me pick which movie / series is or at least have it skip those files since it messes up my library.
I have been testing this out using Red Dawn, both the 1984 version and the 2012 version but both gets placed as the 1984 version.
It names and places the files correctly if they have the year in the name i.e. "Red Dawn (2012).mp4".
Code:
Below example is with "Red Dawn (2012).mp4" renamed to "Red Dawn.mp4"

Is there any way for me to either let me pick which movie / series is or at least have it skip those files since it messes up my library.
I have been testing this out using Red Dawn, both the 1984 version and the 2012 version but both gets placed as the 1984 version.
It names and places the files correctly if they have the year in the name i.e. "Red Dawn (2012).mp4".
Code:
Code: Select all
cd "D:\Google Download Stuff\Series\"
get-childItem 'D:\Google Download Stuff\Series\*.mp4' | filebot -non-strict -rename '*' --db TheTVDB --conflict auto --filter "'s' - 'e'" --format 'D:/Google Download Stuff/Media/Series/{plex[1]} ({y})/Season {s}/{plex.name}' --output 'By Series' --mode interactive
cd "D:\Google Download Stuff\Movies\"
<This section>
get-childItem 'D:\Google Download Stuff\Movies\*.mp4'| filebot -non-strict -rename '*' --mode interactive --db TheMovieDB --conflict auto --format 'D:/Google Download Stuff/Media/Movies/{n0 = n.charAt(0); n0.isDigit() ? "0-9" : n0}/{plex[1]}/{plex.name}' --output 'By First Letter'
</This section>
pause
Code: Select all
D:\Google Download Stuff>PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'D:\Google Download Stuff\Scripts\Move.ps1'"
<Ignore this, Series folder is empty>
Illegal Argument: java.nio.file.InvalidPathException: Illegal char <*> at index 0: * (*)
Rename episodes using [TheTVDB]
No media files: [*]
Failure (°_°)
</Ignore this, Series folder is empty>
Rename movies using [TheMovieDB]
Auto-detect movie from context: [D:\Google Download Stuff\Movies\Red Dawn.mp4]
[MOVE] from [D:\Google Download Stuff\Movies\Red Dawn.mp4] to [D:\Google Download Stuff\Media\Movies\R\Red Dawn (1984)\R
ed Dawn (1984).mp4]
Processed 1 files
Press Enter to continue...:

- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
If you're processing badly named files, make sure to try things with --action test first. Here's how I'd deal with this particular file.
Command:
Output:
Command:
Code: Select all
filebot -rename --db TheMovieDB *.mp4 --filter "y > 2000"
Code: Select all
Rename movies using [TheMovieDB]
Auto-detect movie from context: [Red Dawn.mp4]
Apply filter [y > 2000] on [12] items
Include [Red Dawn (2012)]
Include [Red Dawn (2011)]
Include [Red (2008)]
Include [Red (2002)]
Include [RED (2010)]
Include [Rockin' at the Red Dog: The Dawn of Psychedelic Rock (2005)]
Include [Assembly (2007)]
[MOVE] from [Red Dawn.mp4] to [Red Dawn (2012).mp4]
Processed 1 files
-
- Posts: 1
- Joined: 09 Aug 2017, 12:40
Re: Q&A for n00bs
Hello Forum,
Since I'm new here, I think the n00b section might be the right place for my question.
No matter what I try, I cannot get deluge to run any scripts. I have created a bat file and placed in my documents folder. When executede manually everything works without any problems. But how do i get Deluge to execute my script or my bat-file?
I have tried pasting the script execute-plugin without any luck. Also I have tried putting in a full path for the bat file. C:\users\username\documents\execute.bat. With and without qoutation marks. Also without any luck. How do I get Deluge on windows to execute filebot cmd's after completet download?
Notes
Filebot is up to date.
Deluge is 1.3.15
OS is Windows 10
Since I'm new here, I think the n00b section might be the right place for my question.
No matter what I try, I cannot get deluge to run any scripts. I have created a bat file and placed in my documents folder. When executede manually everything works without any problems. But how do i get Deluge to execute my script or my bat-file?
I have tried pasting the script execute-plugin without any luck. Also I have tried putting in a full path for the bat file. C:\users\username\documents\execute.bat. With and without qoutation marks. Also without any luck. How do I get Deluge on windows to execute filebot cmd's after completet download?
Notes
Filebot is up to date.
Deluge is 1.3.15
OS is Windows 10
-
- Posts: 12
- Joined: 20 Mar 2017, 07:56
Re: Q&A for n00bs
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
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!
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
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!
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
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:
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:
Code: Select all
N:\Done\{plex.name}
-
- Posts: 12
- Joined: 20 Mar 2017, 07:56
Re: Q&A for n00bs
Thanks for you fast reply!rednoah wrote: ↑05 Oct 2017, 20:101.
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:Code: Select all
N:\Done\{plex.name}
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
Illegal usage: output folder must exist and must be a directory: N:\Done\{plex.name}
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
1.
--output and --format have distinctively different meanings and functions.
e.g.
@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.
--output and --format have distinctively different meanings and functions.
e.g.
Code: Select all
-rename --output N:\Done --format {plex.name}
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.
-
- Posts: 2
- Joined: 21 Mar 2019, 13:45
Re: Q&A for n00bs
Hi,
I am currently switching to transmission with openvpn in a docker container on my Synology (DSM 6).
Before I used the Synology default download station and used the amc script to take care of completed downloads. That worked really well.
I tried to setup transmission in the same way, but I don't think transmission is currently able to run the filebot script at all. I can see in the transmission log file that the script is called after a download is completed, but the script is not actually running successfully.
I tried to set the right permissions for the script and changed the location of the script to the docker container, but that did not resolve my issue. When I tried to run a command inside the docker container I noticed that filebot command cannot be found: "bash: filebot: command not found".
As I am pretty new to all things regarding docker, could you guide me in any way to let the docker container access filebot? Do I have to alter the $Path settings?
Thanks and kind regards
I am currently switching to transmission with openvpn in a docker container on my Synology (DSM 6).
Before I used the Synology default download station and used the amc script to take care of completed downloads. That worked really well.
I tried to setup transmission in the same way, but I don't think transmission is currently able to run the filebot script at all. I can see in the transmission log file that the script is called after a download is completed, but the script is not actually running successfully.
I tried to set the right permissions for the script and changed the location of the script to the docker container, but that did not resolve my issue. When I tried to run a command inside the docker container I noticed that filebot command cannot be found: "bash: filebot: command not found".
As I am pretty new to all things regarding docker, could you guide me in any way to let the docker container access filebot? Do I have to alter the $Path settings?
Thanks and kind regards
-
- Posts: 335
- Joined: 06 Jun 2017, 22:56
Re: Q&A for n00bs
Docker images are built with a specific set of stuff inside, think about that image as a separate machine.
It sounds like you didn't install FileBot in this particular image.
It sounds like you didn't install FileBot in this particular image.
I only work in black and sometimes very, very dark grey. (Batman)
-
- Posts: 2
- Joined: 21 Mar 2019, 13:45
Re: Q&A for n00bs
Thanks, that makes sense.
So can I install filebot as a package into my existing docker container, or do I have to create a new docker image with filebot as a dependency?
So can I install filebot as a package into my existing docker container, or do I have to create a new docker image with filebot as a dependency?
-
- Posts: 335
- Joined: 06 Jun 2017, 22:56
Re: Q&A for n00bs
The second option is cleaner, start FROM the first one (Dockerfile syntax) and simply install FileBot, should work then.
I only work in black and sometimes very, very dark grey. (Batman)
-
- Posts: 3
- Joined: 17 Mar 2019, 22:44
Re: Q&A for n00bs
Hey rednoah, I took your advice and just installed filebot straight up.
Is there an amc script command that works with just checking a download folder on schedule and running the renames to output to another folder - then running again 5 min later? Most of the routines posted seem to be focused on torrent scripting, but since I'm running my deluge in a docker those wouldn't work, not passing any commands. I just need a watcher.
Just have filebot installed to Ubuntu as normal. Would something like this, run on a schedule work? Are there any issues with it not completing in time before the next scheduled run - I'm doing local > local copies.
Is there an amc script command that works with just checking a download folder on schedule and running the renames to output to another folder - then running again 5 min later? Most of the routines posted seem to be focused on torrent scripting, but since I'm running my deluge in a docker those wouldn't work, not passing any commands. I just need a watcher.
Just have filebot installed to Ubuntu as normal. Would something like this, run on a schedule work? Are there any issues with it not completing in time before the next scheduled run - I'm doing local > local copies.
Code: Select all
filebot -script fn:amc --output "\download" --action copy -non-strict "\renamed" --log-file amc.log
- rednoah
- The Source
- Posts: 16982
- Joined: 16 Nov 2011, 08:59
- Location: Taipei
- Contact:
Re: Q&A for n00bs
1.
Linux is very powerful. There are many ways to schedule commands. There might even be GUI apps that make it especially easy. Google will help.
The general universal answer is to just use cron:
https://help.ubuntu.com/community/CronHowto
Note that what you're trying to do is not allowed and will get you banned. You need to make sure that you're not processing all files over and over and over ad infinitum.
I recommend getting started with the example in the documentation:
https://www.filebot.net/forums/viewtopic.php?t=215
2.
The filebot-watcher docker container might be what you're looking for:
https://hub.docker.com/r/rednoah/filebot/
e.g.
Note that both /input and /output folder must be on the same docker mount point.
Please make sure you understand how docker works, especially the -v option, before using docker.
Linux is very powerful. There are many ways to schedule commands. There might even be GUI apps that make it especially easy. Google will help.
The general universal answer is to just use cron:
https://help.ubuntu.com/community/CronHowto

If you run this script automatically in intervals every hour or every day, then you must set --def excludeList or you will get banned.
I recommend getting started with the example in the documentation:
Code: Select all
filebot -script fn:amc --output "/path/to/output" --action duplicate -non-strict "/path/to/input" --log-file amc.log --def excludeList=amc.txt
2.
The filebot-watcher docker container might be what you're looking for:
https://hub.docker.com/r/rednoah/filebot/
e.g.
Code: Select all
docker run -it -v /path/to/my/folder:/volume1 -v data:/data rednoah/filebot:watcher /volume1/input --output /volume1/output --action duplicate -non-strict --log-file /volume1/amc.log --def excludeList=/volume1/amc.excludes

