slashes in titles create subdirs when renaming

All about user-defined episode / movie / file name format expressions
Post Reply
stork
Posts: 4
Joined: 26 Jul 2013, 09:21

slashes in titles create subdirs when renaming

Post by stork »

hi,

I use the this script http://www.filebot.net/scripts/sorty.groovy for renaming tv series.

when the title of the episode contains slashes (like http://tv-series.me/switched-at-birth-s ... eeddesire/) the rename doesn't sanitizes the slashes by converting them to something safe but blindly creates the subdirectoies (here /human/desire.mp4) and creates a mess.

is there a workaround?

stork
stork
Posts: 4
Joined: 26 Jul 2013, 09:21

Re: slashes in titles create subdirs when renaming

Post by stork »

p.s. this is on windows..
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: slashes in titles create subdirs when renaming

Post by rednoah »

The path is entirely defined by the formats you've set. You can set any special handling and custom replacement logic there.

I suppose here's the issue:

Code: Select all

{episode}
(complex bindings give you direct access to the object model but there's no auto-cleanup)


Where you should use something like:

Code: Select all

{n} - {s00e00} - {t}
(simple string bindings include auto-cleanup of path separators)
:idea: Please read the FAQ and How to Request Help.
antisgae
Posts: 13
Joined: 29 Aug 2018, 22:48

Re: slashes in titles create subdirs when renaming

Post by antisgae »

Hi the problem is when you use for example {localize.eng.t} it does not sanitize, should like {t}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: slashes in titles create subdirs when renaming

Post by rednoah »

Unfortunately, the format engine can only sanitize top-level bindings implicitly. If you do more complex things in your code then you need to sanitize things yourself as desired.

e.g.

Code: Select all

{localize.eng.t.slash(' ')}
:idea: Please read the FAQ and How to Request Help.
Post Reply