Plex Naming String Help

All about user-defined episode / movie / file name format expressions
Post Reply
ajr88
Posts: 2
Joined: 06 Jan 2026, 05:32

Plex Naming String Help

Post by ajr88 »

Hello, I'm horrible with coding and have been banging my head on the wall trying to match plexes recommend naming structure
" /Batman Begins (2005) {imdb-tt0372784}
Batman Begins (2005) {imdb-tt0372784}.mp4"

and can't seem to get it to work.

Here is the bat code that works though it wont let me add {} around the imdb code so it comes out like.
" /Batman Begins (2005) imdb-tt0372784
Batman Begins (2005) imdb-tt0372784.mp4"

@echo off
"C:\Program Files\FileBot\filebot.exe" -rename "C:\Users\adamr\OneDrive\Desktop\MKV Movies" ^
--db TheMovieDB ^
--format "{n} ({y}) {'imdb-'}{imdbid}/{n} ({y}) {'imdb-'}{imdbid}" ^
--action move ^
--output "C:\Users\adamr\OneDrive\Desktop\MKV Movies"
pause

I have tried to add in { with '{' but it seems to ignore the ' and throws an error. Is there another way to get this string to work that I don't know about?

here is an example of the code that breaks with the '}'
@echo off
"C:\Program Files\FileBot\filebot.exe" -rename "C:\Users\adamr\OneDrive\Desktop\MKV Movies" ^
--db TheMovieDB ^
--format "{n} ({y}) {'{imdb-'}{imdbid '}'}/{n} ({y}) {'{imdb-'}{imdbid '}'}" ^
--action move ^
--output "C:\Users\adamr\OneDrive\Desktop\MKV Movies"

Is this a bug, or am i missing something though in my limited coding mind this should work.

{n} ({y}) {'{imdb-'}{imdbid '}'} but I get
syntax error unexpected input "}"
User avatar
rednoah
The Source
Posts: 24351
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming String Help

Post by rednoah »

:?: What does the Format Editor say?


:!: You are prototyping your custom format in the GUI Format Editor, right? Because prototyping via CMD script tests runs sounds rather cumbersome.


:arrow: Try this:
rednoah wrote: 01 Nov 2025, 07:24

Format: Select all

{ ny.colon(' - ') }{ " {tmdb-$tmdbid}" }{ " {edition-$edition}" }{ " [$vf, $vc, $ac]" }

Code: Select all

Avatar (2009) {tmdb-19995} [1080p, x264, AAC]

:arrow: If you need to avoid "..." in your format so you don't need to "..." in your CMD script, then you can also write code like this:

Format: Select all

{ ny.colon(' - ') }{ '{tmdb-' + tmdbid + '}' }/{ ny.colon(' - ') }{ '{tmdb-' + tmdbid + '}' }
:idea: Please read the FAQ and How to Request Help.
ajr88
Posts: 2
Joined: 06 Jan 2026, 05:32

Re: Plex Naming String Help

Post by ajr88 »

Yes I was prototyping in the app. Looks like your version is working for me. I really appreciate the help, coding is definitely not my strong suite.
User avatar
rednoah
The Source
Posts: 24351
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming String Help

Post by rednoah »

No worries. You're welcome.
:idea: Please read the FAQ and How to Request Help.
Post Reply