Hi, I am new to c# and I am trying to download a file from the webpage. I am able to download the file by using Process.Start("url of the file"). But the downloaded file gets stored in the download folder of my default browser. Is there any way I could change the download folder for the file. Thank you
HI sgrewal1, I will help you, First you need namespace:. Using System.net; Then make a new class :. WebClient webClient = new WebClient(); And use webclient to download and save location like this:. webClient.DownloadFile("location where file download from", @"save location where file will going to save with extension name"); example:. webClient.DownloadFile("http://mysite.com/myfile.txt", @"c:\myfile.txt"); if need any help pmed me or repost here.
Thanks a lot, Capripio for sharing............... It really works. But Is there anyone present who can download file to Specific location using Process.Start()