Page 1 of 1

slashes in titles create subdirs when renaming

Posted: 26 Jul 2013, 09:25
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

Re: slashes in titles create subdirs when renaming

Posted: 26 Jul 2013, 09:44
by stork
p.s. this is on windows..

Re: slashes in titles create subdirs when renaming

Posted: 29 Jul 2013, 12:55
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)

Re: slashes in titles create subdirs when renaming

Posted: 21 Jun 2020, 08:50
by antisgae
Hi the problem is when you use for example {localize.eng.t} it does not sanitize, should like {t}

Re: slashes in titles create subdirs when renaming

Posted: 21 Jun 2020, 09:28
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(' ')}