Page 1 of 1

Filebot Renaming

Posted: 27 Apr 2022, 06:19
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

Re: Filebot Renaming

Posted: 27 Apr 2022, 10:01
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

Re: Filebot Renaming

Posted: 27 Apr 2022, 11:02
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+)/)}

Re: Filebot Renaming

Posted: 27 Apr 2022, 14:57
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 :)

Re: Filebot Renaming

Posted: 28 Apr 2022, 01:40
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?