Using Powershell.
Posted: 06 Oct 2015, 21:10
Completely new to Filebot and not do not quite have my head around running Filebot
from the CLI automated under its own power. Can I get some help on basic syntax to just accomplish the following via CLI?
Want to copy from 'Source/Subdirectories' to 'Destination/Subdirectories' with file name convention "{n}/{'Season '+s}/{n} - {s00e00} - {t}"
Here is what I threw together for Powershell which has worked properly.


Here is what I threw together for Powershell which has worked properly.
Code: Select all
function Start-Filebot{
$source = "D:\Complete\Unsorted\tv\"
$destination = "D:\Complete\TV\"
$db = "TheTVDB"
$format = "{n}/{'Season '+s}/{n} - {s00e00} - {t}"
$conflictpref = "override"
$mode = "-non-strict"
$opt = "-rename"
$dir = $('Get-Item ' + $($source + "* ") + '| select -expandproperty name')
$dir = $dir | Invoke-Expression
$dir | %{
$d = 'D:\complete\unsorted\tv\' + $_
$cmd = {$("Filebot " + $opt + ' "' + $d + '" ' + '--output' + " '" +$destination + "' " + "--format" + ' "' + $format + '" ' + $mode + " --db " + $db + ' --conflict ' + $conflictpref)}
$cmd = $cmd | Invoke-Expression
}}
Start-Filebot