string folderName = @"C:";
string pathString = System.IO.Path.Combine(folderName, "storefolder");
Directory.CreateDirectory(pathString);
string fileName = System.IO.Path.GetRandomFileName();
pathString = System.IO.Path.Combine(pathString, fileName);
if (!File.Exists(pathString))
{
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
webClient.DownloadFileAsync(new Uri(@"192.168.75.99Developer shared folderIconschemistrywhite.png"), pathString);
}
else
{
Console.WriteLine("File "{0}" already exists.", fileName);
return;
}