title: Exception when I try to save a screenshot in Java
body: <p>I am working with selenium and I wrote a method that takes screenshot and saves it in specified folder, but it keeps throwing an exception. Why?
  Here is my code:</p>
  
  <pre><code>    public void takeScreenshot(WebDriver driver) throws IOException{
      Date date = new Date();
      String fileName = new SimpleDateFormat("MM-dd-yy_HH:mm:ss").format(date).concat(".jpeg");
      File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
      File destFile = new File(SCREENSHOTS.toString().concat(fileName));
      FileUtils.copyFile(scrFile, destFile);
  }
  </code></pre>
  
  <p>I am getting following exception:</p>
  
  <pre><code>Exception in thread "main" java.io.FileNotFoundException: C:\Screenshots\09-13-15_02:10:52.jpeg (The filename, directory name, or volume label syntax is incorrect)
  </code></pre>