Filebot Renaming

Any questions? Need some help?
Post Reply
mouzzampk2014
Posts: 35
Joined: 07 Jan 2019, 00:49

Filebot Renaming

Post by mouzzampk2014 »

Hi,

I am using this expression

Code: Select all

{folder.dir.name.space('.').replace("&", "and").replace("!", "").replace("[", "").replace("]", "").replace(":", "").replace("'", "").replace("(", "").replace(")", "").replace("?", "").replace("+", ".").replace("-", "").replace(",", ".").replace("..", ".")}.{s00e00}.{fn.after(/s\d+(e\d+)+./)}
But I am having this small issue when I run the above expression my filename looks like that when filename has multiple episodes

Code: Select all

2.Broke.Girls.2011.S01E23-E24.E24.1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR
Is it possible to only keep this .S01E23-E24?

Thank you
mouzzampk2014
Posts: 35
Joined: 07 Jan 2019, 00:49

Re: Filebot Renaming

Post by mouzzampk2014 »

Hi, when I use above expression in plain file mode I lost the filename from

Code: Select all

2.Broke.Girls.2011.S01E23-E24.1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR
to

Code: Select all

2.Broke.Girls.2011..1080p.DTS-HD.MA.5.1.AVC.REMUX-FraMeSToR
Is it possible to use this expression in plain mode without losing SxxExx?

Thank you
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Filebot Renaming

Post by kim »

try

Code: Select all

{folder.dir.name.space('.').replace("&", "and").replaceAll(/[!\[\]:'()?+-]/, "").replace(",", ".").replace("..", ".")}{any{'.'+s00e00}{'.'+fn.match(/(s\d+e\d+)-?(e\d+)?/)}}{fn.after(/(e\d+)/)}
mouzzampk2014
Posts: 35
Joined: 07 Jan 2019, 00:49

Re: Filebot Renaming

Post by mouzzampk2014 »

kim wrote: 27 Apr 2022, 11:02 try

Code: Select all

{folder.dir.name.space('.').replace("&", "and").replaceAll(/[!\[\]:'()?+-]/, "").replace(",", ".").replace("..", ".")}{any{'.'+s00e00}{'.'+fn.match(/(s\d+e\d+)-?(e\d+)?/)}}{fn.after(/(e\d+)/)}
This is working awesome, thank you so much :)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Renaming

Post by rednoah »

I would strongly recommend separating Episode Mode and Plain File Mode code. Some bindings work differently, or not at all. You don't want to confused yourself.



:idea: We could make {s00e00} work in Plain File Mode by parsing the file name, if reusing the same format for different use cases is somehow desirable. Though FileBot fundamentally forces you to enter the format for each mode separately already, so maybe best to keep things separate as to not confuse one for the other.



:?: Note that using Episode Mode just for {s00e00} probably doesn't make a lot of sense. At best you gain nothing, and at worst you get different episode numbers. Your format is clearly designed for Plain File Mode. What is the Episode Mode use case though?
:idea: Please read the FAQ and How to Request Help.
Post Reply