Great trick affords you a chance of using an unallowed character in a filename

Rafagon

Genius
Gold
Dec 7, 2011
7,566
1,254
113
44
Miami, Florida
#1
Today I needed to create a folder, and I wanted to use a colon in the filename for the folder. However, OS X did not allow this. Semicolons, exclamation points, question marks, and even inverted question marks are allowed, so why not colons?

normal colon.png


I Googled a bit and found the answer here:

"Do not use a colon ( : ) in filenames. If you try to use a colon in a filename, the colon may be converted to a hyphen. More likely, you will get an error message stating, "The name cannot be used. Try another name with fewer characters or no punctuation marks." This is a carryover from a naming restriction in Mac OS 9, where the colon was the separator for directories (much as the forward slash is used in Mac OS X)."

However, I was intent on using the colon, and not a hyphen or a dash.

I proceeded to try the same trick I've previously used on this forum when I've needed to write a banned word that shouldn't be banned, for example, an innocuous name like Joe ****er. With the trick, I can write Joe Cοcker and not get asterisks. (As has been previously stated by the system administrator and by some of the mods, please don't use this trick to overrride the words that are banned from the forum, like expletives, but it should be all right to use the trick if you need to type a word that is only getting rejected because part of the innocuous word contains the banned word.)

If you ever need to use a colon in an OS X filename or folder name, the workaround goes as follows:

Step 1: Under System Preferences > Keyboard, make sure there's a checkmark by the "Show Keyboard & Character Viewers in menu bar" option.

step 1.png (thumbnail; click to enlarge)

Step 2: After performing step 1, you should have the flag of your main langauge up on the status bar. Click on it, then click on Show Character Viewer.

step 2.png (thumbnail, click to enlarge)

Step 3: The Character Viewer appears. On the upper right-hand corner of the Character Viewer, you'll see a blank space with a small magnifying glass icon. Type the character you aren't allowed to use in a file or folder name, and see if any of the Related Characters shown may fit your needs:

step_3.jpg (thumbnail; click to enlarge)

Step 4: If you are satisfied with one of the Related Characters presented within Character Viewer window, double-click on it while still editing the filename or folder name (with the vertical line cursor blinking):

Step 4.png (thumbnail; click to enlarge)

And voilà: You should have your filename or folder name with a character that's as good as the original character not allowed by OS X for filenames or folder names. Via the method I described above, I found a character called a "double-width colon" and I ended up with the result I wanted:

double-width colon.png

It is very likely that many of you will never be seriously affected by this limitation, but if you are, now you know how to get around it. The other big no-no that you may encounter is that you're not allowed to start a filename or folder name with a period (full stop). Well, with this method, you can. There are three alternate periods that will work just as well as the standard period.

I hope someone finds this information useful one day!
 

silvermoon

Evangelist
Gold
Jul 17, 2013
1,624
179
63
Washington
#2
I'm still going to ask... why did you have to use a colon in a filename? Could a hyphen not be sufficient? I wonder if anyone will actually use this trick.
 

Rafagon

Genius
Gold
Dec 7, 2011
7,566
1,254
113
44
Miami, Florida
#4
I'm still going to ask... why did you have to use a colon in a filename? Could a hyphen not be sufficient? I wonder if anyone will actually use this trick.
In my case, I could have settled for a dash and it would've have been the end of the world, but let's say you are an amateur filmmaker and you've shot a movie (or multiple movies) that you will want to convert to both 16:9 and to 4:3 aspect ratios.

You want to store the 16:9 versions in one folder and the 4:3 versions in another folder.

Naming the folder "16:9" will be much nicer than "16-9" or "16..9", because a colon the most widely-accepted symbol for a ratio.

And yes, most normal people would be satisfied with "16-9", even if it looks kind of ugly, but as @Kriss stated, I do have a lot of time on my hands, so there was nothing stopping me from getting that colon in the folder name one way or another... :)