title: Save file to a specific folder in Windows Form C#
body: <p>I am trying to save some selected file in a folder(images) inside my application
  <a href="https://i.stack.imgur.com/PNofS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PNofS.png" alt="enter image description here"></a></p>
  
  <p>I am able to get the file using following code:</p>
  
  <pre><code>         private void button1_Click(object sender, EventArgs e)
      {
  
          string imagelocation = "";
  
          OpenFileDialog dialog = new OpenFileDialog();
  
          if(dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK )
          {
              textBox2.Text = dialog.FileName;
          }
      }
  </code></pre>
  
  <p>For saving the file I got in textBox2, I tried following code. But with following code I have to also select the path where I want to save the file.
  What If I want to (set my path permanently to 'images' folder as shown in pic) for saving?</p>
  
  <pre><code>       private void button2_Click(object sender, EventArgs e)
      {
  
  
          SaveFileDialog f = new SaveFileDialog();
  
          if(f.ShowDialog() == DialogResult.OK)
          {
              using(Stream s = File.Open(f.FileName, FileMode.CreateNew))
              using(StreamWriter sw =  new StreamWriter(s))
              {
                  sw.Write(textBox2.Text);
              }
          }
       }
  </code></pre>