Plex Movies Folder (Flat) With Seperate Subtitle Files to Indiviual Movie Sub Folders

All about user-defined episode / movie / file name format expressions
Post Reply
nwbelectrical
Posts: 2
Joined: 12 May 2024, 01:28

Plex Movies Folder (Flat) With Seperate Subtitle Files to Indiviual Movie Sub Folders

Post by nwbelectrical »

Hi,

I'm trying the organize my movie library which is flat to include subfolders for Plex. I have been correctly naming the files with Filebot since it's inception.

I have been experimenting with a couple of scripts from some forum articles.

The following:

~/Movies/{ fn }/{ fn }

Appears to create the correct movie folder and move the individual folder into it. However any additional items such as subtitle files with the same name but different extensions have an additional folder created and moved rather than being added to the one movie folder.

The following:

{ drive }/Media/{ plex.id }


Appears to create one movie folder, move all items (ie. the movie file and any associated subtitle files) but tries to rename against a scanner and possibly add the IMDB code to the movie folder.

What I'm looking for is a script that works like the second one but does not try and rename the existing file/movie names or add any scanning agent ID to the folder as I have been using Filebot for years and they should be fine anyway. I'd also prefer the exiting movie filenames didn't change in the current Plex database).

Put simply:

For any movie (avi, mov, mkv, mp4 etc) create a new Subfolder. Then move the movie file and any of it's associated .srt, .ass, .idx etc into the folder created in the proceeding step. NOTE: many of my .srt files will have a language identifier for example "Random Movie (2009).en.srt"

Any help would be greatly appreciated.
User avatar
rednoah
The Source
Posts: 23244
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Movies Folder (Flat) With Seperate Subtitle Files to Indiviual Movie Sub Folders

Post by rednoah »

:idea: {fn} is the file name. If the file is named "avatar.eng.srt" then {fn} will give you "avatar.eng" for that file. Plain File Mode does not have the concept of "movie file with external subtitle files" and the like.


:arrow: I would strongly recommend using the {plex} format. You can use {plex} instead of {plex.id} if you don't like the ID marker. If you're organizing files for Plex then you'll want to name files and folders correctly. If things are already in order, then nothing will change. Since you have a flat file structure, we can assume that things are not strictly in order. Since you're changing file paths, file paths will change in the Plex database.


:arrow: If you're organizing files primarily for yourself and not Plex, or if you must use offline Plain File Mode, then we can talk about other approaches that don't follow the Plex naming standard. Perhaps {mediaFile} and {mediaFileName} will come in handy. Click Icon View Bindings in the Format Editor for details and examples.
:idea: Please read the FAQ and How to Request Help.
nwbelectrical
Posts: 2
Joined: 12 May 2024, 01:28

Re: Plex Movies Folder (Flat) With Seperate Subtitle Files to Indiviual Movie Sub Folders

Post by nwbelectrical »

Hi,

Thanks for the reply.

I ended using the {Plex} format. Namely the following in the end.

{ drive }/Media/{ plex }

Broke the operation up into smaller batches as there were some 3800 items. Started with Strict mode then manually sorted through the ones Filebot was unable to definitively rename by it's self.

Overall the operation when well and my Library response times have improved tremendously.

Thanks again for a brilliant product. It's one of a few product licenses I don't mind renewing every year because I get so much use out of it.

Cheers
Post Reply