So, I have this code i am programming under a button. When pressed, the user is asked if they want to download the newest File. If yes, then download it and the download location is supposed to be: Documents\Fiddler2 (You Get this Folder created when Installing Fiddler Classic).
However, after several different attempts, the file is only downloaded to the Documents Folder and needs to download to the Documents\Fiddler2 Folder. What am I doing wrong?
private void button4_Click(object sender, EventArgs e)
{
string title = "Check For New Version.";
string question = "Would you like to Check for any Updates?";
string url = "www.google.com";
if (DialogResult.Yes ==
MessageBox.Show(this, question, title,MessageBoxButtons.YesNo,MessageBoxIcon.Question))
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string path2 = Path.Combine(path, @"Fiddler2");
MessageBox.Show(path2);
Directory.SetCurrentDirectory(path2);
using (var client = new WebClient())
{
client.DownloadFile("https://drive.google.com/file/d/13K2IEH-FNQ2HhqAlvaYO3sEZoeWOtPMN/view?usp=sharing", "test.png");
}
}