OSX won't accept colon (:) character in file names

Support for Mac OS X users and the Mac App Store package
Post Reply
rce3
Posts: 1
Joined: 27 Feb 2017, 05:00

OSX won't accept colon (:) character in file names

Post by rce3 » 27 Feb 2017, 05:12

Just downloaded Filebot from the Mac App store and am running it on Mac Sierra with all recent updates.

When I rename movies, Filebot sometimes proposes a title that includes the colon character. For example "Thor: The Dark World (2013)".

But Mac OS X doesn't allow file names with colons in them. Filebot throws a warning about this and replaces the colon with a backslash, i.e., "Thor\ The Dark World (2013)". The renamed file is then successfully saved to disk.

HELP REQUEST:

Is there anyway to change the default replacement character so I don't have to manually edit each file name?

For example, I've been manually replacing the backslash with " -". (Note the leading space between the quotes.) That gives me: "Thor - The Dark World (2013). Would be great to do this automatically.

BUG REPORT/FEATURE REQUEST:

Arguably having the Mac version of the app propose file names which are not compatible with the Mac file system is a bug. On the other hand, it is the correct name of the movie. Regardless, perhaps whatever solution you propose in response to the help request above should be enabled by default in some future release?

Thanks!

-Robert

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

Re: OSX won't accept colon (:) character in file names

Post by rednoah » 27 Feb 2017, 12:36

1.
By default, FileBot does not let you use illegal characters in filenames:
Image
If you click the Validate Image then FileBot will strip away the illegal characters and allow you to continue.

If you click Continue Image without validating file paths first, then you are forcing the destination path, and it's up to the OS to either reject or perform the filesystem operation.

:idea: Mac OS does support : colon in filenames. Finder does not support : colon for historical reasons and displays a replacement character even though there's actually a : colon in the filename as far as the filesystem is concerned (and any other application like FileBot, Plex, Terminal, etc).


2.
Please read FAQ #1 and learn how format expressions work.

You can generate the destination path in your format and do any kind of replacement you want. I recommend using the {plex} binding so you don't have to worry about the intricacies of generating proper destination paths.
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

AuralArch
Posts: 1
Joined: 21 Jun 2017, 20:07

Re: OSX won't accept colon (:) character in file names

Post by AuralArch » 21 Jun 2017, 20:18

Perfect answer!

(Just a bit of extra info:) In MacOS (actually is HFS+ which is Mac's filesystem) the colon (:) is the native directory delimiter (instead of "/"). It isn't seen in the terminal and most other places because they've replaced it with the slash for convenience and to avoid confusion. But it is an illegal character for a filename for that reason- it would divide the filename making everything before the colon the name of the parent directory.

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

Re: OSX won't accept colon (:) character in file names

Post by rednoah » 22 Jun 2017, 02:44

Internally this may be true, but from the application point of view, colon is a perfectly valid character and works just fine:

Code: Select all

$ export JAVA_OPTS='-Dunixfs=true'
$ filebot -rename 'Thor The Dark World 2013.mkv' --db TheMovieDB --format {ny} --log INFO
[MOVE] from [Thor The Dark World 2013.mkv] to [Thor: The Dark World (2013).mkv]
$ ls Thor*
Thor: The Dark World (2013).mkv

However, by default colon is removed for compatibility reasons because colon is definitely not a valid character on Windows.
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests