Raname folders only and keep releases names!

Support for Windows users
Post Reply
Xazmah
Posts: 15
Joined: 29 May 2018, 19:12

Raname folders only and keep releases names!

Post 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?!
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Raname folders only and keep releases names!

Post by kim »

You did not look close enough :)
fn original filename
so

Code: Select all

{n} ({y})/{fn}
Xazmah
Posts: 15
Joined: 29 May 2018, 19:12

Re: Raname folders only and keep releases names!

Post 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?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Raname folders only and keep releases names!

Post 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. ;)
:idea: Please read the FAQ and How to Request Help.
Xazmah
Posts: 15
Joined: 29 May 2018, 19:12

Re: Raname folders only and keep releases names!

Post 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?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Raname folders only and keep releases names!

Post 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.

:idea: 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.
:idea: Please read the FAQ and How to Request Help.
Xazmah
Posts: 15
Joined: 29 May 2018, 19:12

Re: Raname folders only and keep releases names!

Post 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 ?!
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Raname folders only and keep releases names!

Post by rednoah »

1.
I see. You want subtitle filenames to take the name of the nearby video file:

Code: Select all

{media.filename}
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
:idea: Please read the FAQ and How to Request Help.
Xazmah
Posts: 15
Joined: 29 May 2018, 19:12

Re: Raname folders only and keep releases names!

Post by Xazmah »

@rednoah thanks {media.filename} worked fine x)
Post Reply