How to change filenames for Plex without changing the movie subfolder

Any questions? Need some help?
Post Reply
jordant
Posts: 2
Joined: 01 Nov 2025, 00:43

How to change filenames for Plex without changing the movie subfolder

Post by jordant »

I have a set of folders with movie files I'd like to rename

x:/movies/movie 1 title (year)
Movie 1 *garbage info*.avi
Poster.jpg
Banner.jpg
Picture of my dog who loved this movie.jpg
x:/movies/movie 2 title (year)
Movie 2 *garbage info*.avi
Poster.jpg
Banner.jpg
Picture of my cat who loved this movie.jpg
x:/movies/movie 3 title (year)
Movie 3 *garbage info*.avi
Poster.jpg
Banner.jpg
A random vacation pic that reminds me of this movie.jpg

I only don't want to rename any of my extra folder stuff. I'm renaming for Plex. I'm using the following naming convention:
{ ~plex.id ** { " {edition-$edition}" } % { " [$vf, $vc, $ac]" } }

(I stole this from viewtopic.php?t=4116#operators but it doesn't appear to work as {tvdb} is not getting added to the video file name regardless of the plex.id XX operator being %, * or ** - all result in the same renaming)

By default, FileBot will "rename" the folder with {tvdb} and leave the {tvdb} off the video filename. What I've found in practice is that Filebot does NOT rename the folder but instead creates a new folder with the Plex naming scheme, moves the video file to this new folder, and leaves all of the other files in the original folder which has the pre-FileBot name. The result being:

x:/movies/movie 1 title (year) {tvdb}
Movie 1 (year) [movie info].avi
x:/movies/movie 1 title (year)
Poster.jpg
Banner.jpg
Picture of my dog who loved this movie.jpg
...etc

This creates a massive headache as I now have to copy-paste all of the old files from the original folder to the newly created (not renamed) folder with the video and then delete the obsolete folder.

Based on this page from Plex - https://support.plex.tv/articles/naming ... dia-files/ - Plex would like (or will accept) the TVDB number on both/either the folder and/or filename.

My request is how to avoid this. My preference would be:

Keep the movie file folder the same (don't rename the folder which contains the video file) and have each video file renamed in-place with the (year) {TVDB} [info] in the renamed file. Is that possible? I have 1000 folders to process this way and would really like to not have to do them one by one :-)

Thanks!
User avatar
rednoah
The Source
Posts: 24261
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to change filenames for Plex without changing the movie subfolder

Post by rednoah »

:idea: If your format generates a file name (and not a file path) then FileBot will rename the file in place:

Format: Select all

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

Code: Select all

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


:idea: Alternatively, if you choose to organize files into a proper file and folder structure, then you can configure FileBot to move Companion Files alongside the primary movie file.
:idea: Please read the FAQ and How to Request Help.
jordant
Posts: 2
Joined: 01 Nov 2025, 00:43

Re: How to change filenames for Plex without changing the movie subfolder

Post by jordant »

I realized after I posted that abandoning the plex auto-format was the right way to go, but I would have never guessed ny.colon(' - ') was the shorthand for the file and year.

On a side note, I've noticed that the GUI seems to require the use of $xxx as the operator, but most of the forum examples and the Format Expressions page omit the $ character. Is that just to reduce typing, or did filebot change in the past?
User avatar
rednoah
The Source
Posts: 24261
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to change filenames for Plex without changing the movie subfolder

Post by rednoah »

:idea: You can do the same thing in different ways:

Format: Select all

{n} ({y})

Format: Select all

{ n + ' (' + y + ')' }

Shell: Select all

{ "$n ($y)" }
$ is notably not used for variables. $ is however used in "string values" for String interpolation.



:idea: {ny} is a convenience binding for Name (Year). {ny} notably ensures that you don't end up with a duplicate series year if the series name itself (e.g. Doctor Who (2005)) already includes the series year as part of the series name.



:idea: I've added replace : colon with - dash in the example above because you would have asked for that sooner or later, as {plex} takes care of these kinds of things by default:

Format: Select all

{ ny.colon(' - ') }
:idea: Please read the FAQ and How to Request Help.
Post Reply