Question

I want to download a file to a specific folder. I'm using WebClient.DownloadFile, but what I would like is to let the user select where this file would be saved, not just download it into any folder.

How can I do this?

Was it helpful?

Solution

The folder that the user would download the file to would depend on their browser, and system settings.

All you can do is provide the file to download, and it would be up to them (and their browser) to select a local folder (on their system).

If you want to control that process, you would have to use an embedded plugin like Java, Silverlight, Flash, etc.

OTHER TIPS

If you are using Windows Forms, you can use the SaveFileDialog class to allow the users to pick a file name, and then pass that name to the second parameter of WebClient.DownloadFile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top