Special symbols in file path

I like to organize my files to my liking and sometimes use special symbols in folder names, like:

  • #Working
  • !Soft
  • etc.

All good most of the time, but there are couple of problems I found:

  1. Microsoft help files in CHM format do not work if path contains “pound” (or “hash”) sign – “#”
    If you try to open CHM file from such folder, you’ll get “The page cannot be displayed” error from the IE browser which is hosted inside help control.
    There is some lengthly discussion about this and how people mix this issue with another problem:
    CHM help files error: The page cannot be displayed
    That other problem is described here: KB896054
  2. Java have issues running from folders with “!” in side folder names. You may see different errors depending on the application.
    As an example, Sun’s tzupdater.jar throws java.lang.ExceptionInInitializerError if executed from such folder.
    Note 1: The problem appears to happen while trying to access resources in java.util.ResourceBundle.getBundle.
    Note 2: Appears to be fixed in JDK 1.6
  3. Microsoft batch files hate “!” signs everywhere if delayed variable expansion is enabled via “SetLocal ENABLEDELAYEDEXPANSION” command. Not only it will ignore single “!” in commands like “echo hi!”, but magically, folders with “!” disappear – statement like If exist C:\!Apps\myfile.txt will return false even if file is there. (and no, quotes will not help here).

When next time you decide to create a folder or file with special character in it – think twice first if it may create problem for you going forward…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s