I am a registered user running FileBot v.5.1.1 on a Windows 2019 Server.
I have had a problem for a while that I am not entirely sure how to fix, couldn't fix a solution in the forum, so here we go.
In short I want movies that starts with The, for example "The Artifice Girl (2022)" to be renamed: "Artifice Girl, The".
The following script was working at some stage but no more it seems.
I am running a PowerShell script on a scheduler that checks a folder and renames the content, here is the command pruned for easy reading:
Console Output: Select all
Start-Process -FilePath "C:\Program Files\FileBot\filebot.exe" -ArgumentList `
@(
"-script fn:amc X:\_Downloads\Complete --output X:\",
"--def movieFormat=`"{n =~ /UFC/ ? 'UFC'/n.sortName() : 'Movies'/n.sortName('$2, $1')/n.sortName('$2, $1')}{' CD'+pi}`"",
"--def seriesFormat=`"Series/{n.sortName()}/{'Season '+s}/{n.sortName()} {s00e00}`" -non-strict",
"--def clean=y",
"--def ignore=_UNPACK_",
"--conflict skip",
"--def subtitles=en",
"--def plex=192.168.60.2:XXXXXXXXXXXXXXXXXXXX",
"--log-file $LogFile"
) -NoNewWindow -Wait
See below FileBot log output for an example.
Console Output: Select all
Run script [fn:amc] at [Sun Nov 17 22:40:05 AEDT 2024]
Parameter: movieFormat = {n =~ /UFC/ ? 'UFC'/n.sortName() : 'Movies'/n.sortName(', ')/n.sortName(', ')}{' CD'+pi}
Parameter: seriesFormat = Series/{n.sortName()}/{'Season '+s}/{n.sortName()} {s00e00}
Parameter: clean = y
Parameter: ignore = _UNPACK_
Parameter: subtitles = en
Parameter: plex = *****
Argument[0]: X:\_Downloads\Complete
Input: X:\_Downloads\Complete\The Artifice Girl (2022) [1080p] [WEBRip] [5.1] [YTS.MX]\The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].mp4
Input: X:\_Downloads\Complete\The Artifice Girl (2022) [1080p] [WEBRip] [5.1] [YTS.MX]\The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].srt
Group: {Movie=The Artifice Girl (2023), Series=null} => [The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].mp4, The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context [X:\_Downloads\Complete\The Artifice Girl (2022) [1080p] [WEBRip] [5.1] [YTS.MX]\The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].mp4]
[MOVE] from [X:\_Downloads\Complete\The Artifice Girl (2022) [1080p] [WEBRip] [5.1] [YTS.MX]\The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].mp4] to [X:\Movies\,\,.mp4]
[MOVE] from [X:\_Downloads\Complete\The Artifice Girl (2022) [1080p] [WEBRip] [5.1] [YTS.MX]\The.Artifice.Girl.2022.1080p.WEBRip.x264.AAC5.1-[YTS.MX].srt] to [X:\Movies\,\,.srt]
Processed 2 files
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ