Page 1 of 1

My custom format moves files up in the folder tree

Posted: 28 Oct 2023, 20:25
by botuser
I am using this preset for renaming movie files:

Files: Use Original Files selection
Format: {plex.name}/{plex.name}


However, when I run this preset it moves files up the folder tree. For example, I have a file in:
D:\Movies\To Watch\Movie to be renamed.mp4

when I run the preset it moves to
D:\Movies\Movie Name\Movie Renamed.mp4

Am I using the wrong syntax?

Thanks.

Re: Help with a rename preset

Posted: 29 Oct 2023, 03:41
by rednoah
:idea: If your format generates a relative file path, then FileBot will try to integrate that relatively to the current file structure.


:?: Where do you want to move / organize files? The file path given above looks good to me in the given context:

Code: Select all

D:\Movies\Avatar (2009)\Avatar (2009).mp4

:idea: You can generate absolute file paths to organize files paths absolutely:
https://www.filebot.net/manual.html

Format: Select all

{ drive }/Media/{ plex.id }



:!: Note that {plex.name}/{plex.name} is a bad idea because you will not get what you want once you process subtitle files:

Format: Select all

Avatar (2009).eng/Avatar (2009).eng.srt

Re: My custom format moves files up in the folder tree

Posted: 30 Oct 2023, 00:56
by botuser
Thanks for the detailed explanation!

Ideally I would like the movie folder to be created relative to the location where the file is opened.

So in the case of:

Code: Select all

D:\Movies\To Watch\Movie to be renamed.mp4
I would like it to be located in:

Code: Select all

D:\Movies\To Watch\[Name of Movie]\Movie Renamed.mp4
Is there a way to set that?

Re: My custom format moves files up in the folder tree

Posted: 30 Oct 2023, 03:43
by rednoah
You can generate an absolute path to move / rename files exactly as specified by that absolute path:

Format: Select all

{ folder }/{ ~plex }