title: Create Dynamic File Names for Screenshots Selenium Webdriver
body: <p>In my script, I need to take screenshots at multiple locations.  I want to save all screenshots in the same folder, with a unique name for each file.  </p>
  
  <p>There are answers explaining how to append time/date stamps to the file, which I do not need.  The script will run every week and will overwrite the previous week's image files.  </p>
  
  <p>I'm using Java with Webdriver.  Here is what I have:</p>
  
  <pre><code>String screenshots;
  screenshots = "C:/eStore/Projects/Screenshots/Catalog/";  //location for images
  
  File screenshots = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
  FileUtils.copyFile(screenshots, new File("screenshots + 01Belts.jpg"));
  </code></pre>