title: Hot to get rid of an java.io.Exception at java.io.WinNTFileSystem.createFileExclusively?
body: <p>I currently have the problem that I encounter an exception I never saw before and that's why I don't know how to handle it. </p>
  
  <p>I want to create a file according to given parameters, but it won't work.</p>
  
  <pre><code>public static Path createFile(String destDir, String fileName) throws IOException {
          FileAccess.createDirectory( destDir);
  
          Path xpath = new Path( destDir + Path.SEPARATOR + fileName);
  
          if (! xpath.toFile().exists()) {
              xpath.toFile().createNewFile();
              if(FileAccess.TRACE_FILE)Trace.println1("&lt;&lt;&lt; createFile " + xpath.toString() );
          }
        return xpath;
    }
  
  
    public static void createDirectory(String destDir) {
        Path dirpath = new Path(destDir);
        if (! dirpath.toFile().exists()) {
            dirpath.toFile().mkdir();
            if(TRACE_FILE)Trace.println1("&lt;&lt;&lt; mkdir " + dirpath.toString() );
        }
    }
  </code></pre>
  
  <p>Every time I run my application the following exception occurs:</p>
  
  <pre><code>java.io.IOException: The system cannot find the path specified
  at java.io.WinNTFileSystem.createFileExclusively(Native Method)
  at java.io.File.createNewFile(Unknown Source)
  [...]
  </code></pre>
  
  <p>How do I get rid of it? (I am using Win7 64bit btw)</p>