title: Automatically increment filename
body: <p>Right now I have this code:</p>
  <pre><code>int number = 0;
  DirectoryInfo di = new DirectoryInfo(scpath + @&quot;Screenshots\&quot;);
  
  if (di.Exists) {
  
  } else {
      di.Create();
  }
  int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;
  int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;
  Bitmap bmpScreenShot = new Bitmap(screenWidth, screenHeight);
  Graphics gfx = Graphics.FromImage((Image)bmpScreenShot);
  gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
  bmpScreenShot.Save(di + &quot;Screenshot_&quot; + number, ImageFormat.Jpeg);
  </code></pre>
  <p>Program takes a screenshot (which works) and saves it. What I want to do is to have the program check and see if a screenshot exists (&quot;Screenshot_*&quot;) and to create it if it doesn't. If it does, increment file name till it hits a number that hasn't been used at the end of &quot;Screenshot_&quot;
  Not sure how to go about this given that it's more with files and incrementing. I'm thinking about a for loop but I'm playing with it now.</p>