title: Unable to create a file in Java (IOException)
body: <p>I am trying to create a directory and csv file inside that directory. The directory is created  but on file creation it gives an exception
  Here is my code</p>
  
  <pre><code> File dirName = new File("C:\\Umair\\Trace Bandwidth Statistics");
   if (!dirName.exists())
       dirName.mkdir();
   DateFormat df = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");  
          File file = new File( dirName + "\\"+ df.format(new Date()) +"_Statistics.csv"); 
          if ( !file.exists() )
              file.createNewFile();
  </code></pre>
  
  <p>I get this exception java.io.IOException: The filename, directory name, or volume label syntax is incorrect</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>