Move Subs to main folder and rename

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Move Subs to main folder and rename

Post by JazzCarnival »

Dear all,

This is my first port is this forum after purchasing the license of Filebot and I need your help.

LI have a movie collection with every movie in a single folder and the sub folder inside this folder. I would like to move the content of the subtitle folder to the main folder and rename the subtitle with the name of the main folder.

I have been reading similar posts on this forum, but I don't understand how this scripting works.

Would somebody be so kind to explain me the process step by step? I'm not good with scripts and/or command line.

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

Re: Move Subs to main folder and rename

Post by rednoah »

JazzCarnival wrote: 18 Mar 2021, 18:23 LI have a movie collection with every movie in a single folder and the sub folder inside this folder. I would like to move the content of the subtitle folder to the main folder and rename the subtitle with the name of the main folder.
Can you provide example file paths as text for one of your movie folders?


:idea: Please read How to Request Help.


JazzCarnival wrote: 18 Mar 2021, 18:23 Would somebody be so kind to explain me the process step by step? I'm not good with scripts and/or command line.
I would use the GUI, specially if it's a one-time task.
:idea: Please read the FAQ and How to Request Help.
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Re: Move Subs to main folder and rename

Post by JazzCarnival »

Hi,

Please see below:

Code: Select all


Currently I have:

E:\HD Movies\Movie name folder           
                      ├── Movie.mp4
                      └── subs
                            └── 2_eng.srt
 
And I would like:                                
                                   
E:\HD Movies\Movie name folder
                      ├── Movie.mp4
                      └── Movie_eng.srt

Thanks for your help!

Best regards
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Re: Move Subs to main folder and rename

Post by JazzCarnival »

Hi,

Sorry a small correction:

Code: Select all

Currently I have:

E:\HD Movies\Movie name folder           
                      ├── Movie.mp4
                      └── subs
                            └── 2_eng.srt
 
And I would like:                                
                                   
E:\HD Movies\Movie name folder
                      ├── Movie.mp4
                      └── Movie.eng.srt

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

Re: Move Subs to main folder and rename

Post by rednoah »

If you drop those files into the GUI, then both video file and subtitle file are matched correctly to the same movie. No?

The target structure is then just a matter of your custom format, e.g. {plex.name} will do just fine.
:idea: Please read the FAQ and How to Request Help.
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Re: Move Subs to main folder and rename

Post by JazzCarnival »

Hi,

Using {plex.name} the movie folder changes its name but the subtitles are still in the "Subs" folder and with 2_eng.srt as filename.

Did I miss anything? It's the first time I use this software.

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

Re: Move Subs to main folder and rename

Post by rednoah »

{plex.name} is relative to the current folder. You'll need to add an absolute path before that if you want to organize files absolutely.


e.g.

Code: Select all

E:/Media/{plex}

:idea: Please read FAQ #1 and learn how format expressions work. See {plex} format for details on {plex}.
:idea: Please read the FAQ and How to Request Help.
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Re: Move Subs to main folder and rename

Post by JazzCarnival »

Hi,

I tried it, but it's not working as expected the subtitles are still in the "Subs" folder and the movie name has been renamed with the folder name. I would like to the movie to keep it's name, the subtitles matching the movie name and moved to the main folder and the main movie folder based on the TheMovieDB.

Please see below:

Code: Select all

Currently I have:

E:\HD Movies\Movie.1080p.BluRay.X264      
                      ├── Movie.1080p.BluRay.X264.mp4
                      └── subs
                            └── 2_eng.srt
 
And I would like:                                
                                   
E:\HD Movies\Movie name folder (TheMovieDB)
                      ├── Movie.1080p.BluRay.X264.mp4
                      └── Movie.1080p.BluRay.X264.eng.srt
Would you be so kind to let me know exactly what I need to do? I would really appreciate it.

Thanks!
JazzCarnival
Posts: 8
Joined: 18 Mar 2021, 18:18

Re: Move Subs to main folder and rename

Post by JazzCarnival »

Hi,

I managed to make it work partially using {plex}, is there a way to keep the movie file without renaming and rename the subtitles to match the movie name? As per the description of my previous post?

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

Re: Move Subs to main folder and rename

Post by rednoah »

I'd use a naming scheme that matches the target file path that I want to see:

Code: Select all

E:/HD Movies/{n}/{n}.{vf}.{vs}.{vc}{subt}
:idea: https://www.filebot.net/naming.html
:idea: Please read the FAQ and How to Request Help.
Post Reply