Page 1 of 1
Raname folders only and keep releases names!
Posted: 29 May 2018, 19:29
by Xazmah
Hi all,ive read the Binding Reference on
https://www.filebot.net/naming.html and cant find a releasename variable is there a way to rename folders only and keeping releases name?
something like this : Filebot/{n} ({y})/{relasename}{".$lang"}
The folder will be like this : Movie Name (Year)/Title.Of.The.Movie.YEAR.Source.Codec-GROUP.ext + Title.Of.The.Movie.YEAR.Source.Codec-GROUP.lang.srt?!
Re: Raname folders only and keep releases names!
Posted: 29 May 2018, 20:46
by kim
You did not look close enough
fn original filename
so
Re: Raname folders only and keep releases names!
Posted: 30 May 2018, 04:03
by Xazmah
So i'm using Filebot/{n} ({y}) ({vf} - {source} - {group})/{fn}{".$lang"} now but the folder have two subs fr.srt and en.eng using this naming scheme subs got renamed to filename.fr.fr.srt and filename.en.en.srt without it subs got filename.srt and filename.srt so one will overwrite the other how to fix it?
Re: Raname folders only and keep releases names!
Posted: 30 May 2018, 05:22
by rednoah
So you have two cases, for video files you want to just use the original name, but for subtitle files you want to add the language suffix, but only if it's not there already, and that obviously will require a few if-then-else conditions.
Here's an example to get you started:
Code: Select all
{f.subtitle ? fn.nameWithoutExtension + '.' + lang : fn}
EDIT:
Xazmah wrote: ↑30 May 2018, 04:03
So i'm using Filebot/{n} ({y}) ({vf} - {source} - {group})/{fn}{".$lang"} now but the folder have two subs fr.srt and en.eng using this naming scheme subs got renamed to filename.fr.fr.srt and filename.en.en.srt without it subs got filename.srt and filename.srt so one will overwrite the other how to fix it?
If
{fn}{".$lang"} yields
filename.en.en.srt then it means the original subtitle name was
filename.en.srt which means
{fn} will give you
filename.en and not
filename which means the
filename.srt conflict you describe can't happen in the first place. Make sure we're not trying to solve a problem that doesn't actually exist.

Re: Raname folders only and keep releases names!
Posted: 31 May 2018, 04:37
by Xazmah
@rednoah {f.subtitle ? fn.nameWithoutExtension + '.' + lang : fn} didnt work form me or i dont know how to use it should i use it like this Filebot/{n} ({y})/{f.subtitle ? fn.nameWithoutExtension + '.' + lang : fn} ?
because using this naming scheme the movie name is the fn but the sub name didnt change was sub.srt become sub.lang.srt and not fn.lang.srt how to fix it please?
Re: Raname folders only and keep releases names!
Posted: 31 May 2018, 07:37
by rednoah
{fn} refers to the file name of the file you're renaming, so it's different for the movie file and for the subtitle file. Since you're trying to make movie files and subtitle files have the same name,
{fn} is not a good solution here.

The easiest solution would be to let FileBot do it's renaming
(e.g. by using {plex} format) properly and then all the files will have the same name. But you won't be able to keep the original filename this way.

Please post a specific example, with file paths as text, or screenshots, and clearly tell us what you want the final filenames to be for your movie and subtitle files.
Re: Raname folders only and keep releases names!
Posted: 31 May 2018, 17:16
by Xazmah
@rednoah
https://i.imgur.com/G5cuped.png
this is an example i want engsub.srt to be > La.Haine.1995.iNTERNAL.720p.BluRay.x264-LiBRARiANS.eng.srt
and arasub.srt to be > La.Haine.1995.iNTERNAL.720p.BluRay.x264-LiBRARiANS.ara.srt
i'm using > Filebot/{n} ({y}) (source)/{fn}{".$lang"}
note : using > Filebot/{n} ({y}) ({vf} - {source} - {group})/{fn}{".$lang"} filebot pickup iNTERNAL as group and not LiBRARiANS how to force filebot to pickup the last characters after the ( - ) as the group ?!
Re: Raname folders only and keep releases names!
Posted: 01 Jun 2018, 08:42
by rednoah
1.
I see. You want subtitle filenames to take the name of the nearby video file:
This works because all MediaInfo bindings
(e.g. video codec, audio format, etc) will automatically retrieve info from the next best video file, instead of the file itself, that
{f} and
{fn} refer to.
2.
Here's some information on how
{group} works and alternative approaches, such as matching any
-GROUP$ pattern:
viewtopic.php?f=5&t=4
Re: Raname folders only and keep releases names!
Posted: 01 Jun 2018, 17:50
by Xazmah
@rednoah thanks {media.filename} worked fine x)