title: saving multiple image to local folder using its default filename in vb.net
body: <p>I was trying to save multiple image to a local folder in one go in vb. Right now, i am able to save one image at a time to a specified folder. In my code, i have set up a file name for the image to use when uploaded. What I needed is to save the image with it's original file name and file type. My program should also allow user to save multiple images in one go.</p>
  
  <p>I am Using VB 2013 Ultimate</p>
  
  <p>this is the code for searching.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> Try
              a.Filter = "Image files | *.*"
              If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
                  PictureBox1.Image = Image.FromFile(a.FileName)
                  PictureBox1.BackgroundImageLayout = ImageLayout.Stretch
  
              End If
          Catch ex As Exception
              MsgBox(ex.Message)
          End Try</code></pre>
  </div>
  </div>
  
  and this is my code for saving</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>If (Not System.IO.Directory.Exists("d:/Site Images/" &amp; Label33.Text &amp; "/")) Then
                  System.IO.Directory.CreateDirectory("d:/Site Images/" &amp; Label33.Text &amp; "/")
              End If
              'Dim address = ("d:/Site Images/" &amp; a.FileName &amp; ".jpg")
              PictureBox1.Image.Save("d:/Site Images/" &amp; Label33.Text &amp; "/" &amp; "a.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)</code></pre>
  </div>
  </div>
  </p>
  
  <p>thanks for the help.</p>