使用此代码,我可以下载文件,但我应该知道文件名。有没有办法下载目录中的任何文件(目录链接:https ://www.dropbox.com/sh/koao8dlfpcao8sk/XzDZMfejiF )并运行它?
private void Update_Load(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
webClient.DownloadFileAsync(new Uri("https://www.dropbox.com/s/6o5kvzr7s0c6mne/Test.txt"), @"C:\Users\Admin\Downloads\Test.txt");
}