Autoreplace ':' with '-'

All your suggestions, requests and ideas for future development
Post Reply
Montago
Posts: 3
Joined: 28 Apr 2014, 17:40

Autoreplace ':' with '-'

Post by Montago »

My Windows 3.1 machine doesn't support colon ':' in filenames... neither does Windows 95, 98, XP, 2000, 2003, Vista, 7 nor 8.1...

So could you please auto-replace colon ':' with a minus '-' (preferably also with a padded space in case the colon is up close to the main title)

eg: "Cosmos: A Spacetime Odyssey - S01E01" is clearly not valid - which FileBot already know and a prompt will popoup.. However, I cant find a setting that auto-correct these titles !!

the obvious solution would be to replace : with - like this (padded):
"Cosmos - A Spacetime Odyssey - S01E01"

This would be AWESOME !... just like FileBot .. Goddamn AWESOME !!!!

Thanks
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Autoreplace ':' with '-'

Post by rednoah »

So? Logs? What's not working?

FileBot is clearly already fixing the names, and has been since 2008

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Cosmos A Spacetime Odyssey]
Fetching episode data for [Cosmos: A Spacetime Odyssey]
Stripping invalid characters from new path: TV Shows/Cosmos: A Spacetime Odyssey/Season 01/Cosmos: A Spacetime Odyssey - S01E01 - Standing Up In The Milky Way
[COPY] Rename [D:\workspace\testdata\AMC-TEST\Cosmos.A.Spacetime.Odyssey.S01E01.avi] to [D:\workspace\output\TV Shows\Cosmos A Spacetime Odyssey\Season 01\Cosmos A Spacetime Odyssey - S01E01 - Standing Up In The Milky Way.avi]
Processed 1 files

If the issue you mean is actually that want to replace : with - instead of the default behavior that just strips invalid chars, then please RTFM.

The solution will look like this:

Code: Select all

{n.replace(':', ' -')}
:idea: Please read the FAQ and How to Request Help.
Post Reply