I created a code that downloads OneDrive folders as zip folders. When the file's downloaded, I checked it was there but when I opened it, it was a displaying an error message saying, the compressed(zip) folder is invalid. Is the below code correct for downloading folders as zip files?
string myWebUrlFile = "https://1drv.ms/u/s!Ag_oTpUdmpVj0XsrWzdJ4YfbyjUd?e=wER6Se";
// Local path where the file will be saved
string myLocalFilePath = "C:/Users/bnara/Pictures/Download.zip";
using (var client = new WebClient())
{
client.DownloadFile(myWebUrlFile, myLocalFilePath);
}