Hi,
so i want to create “updater” for my game, but whenever i download zip file (by c#) it cannot be opened, and when i try to download folder, it shows as a file without extension. Is there way to download folder or zip file? I’ve tried using both, Google drive and Dropbox.
Thanks in advice and sorry for my bad english.
You can’t download a folder, you have to download all individual files it contains.
However, zip file download should work.
Can you show the code how you are doing it?
sure,
using (var client = new WebClient())
{
client.DownloadFile("[googledrivepath].zip", "C:\\marciweleq\\gamefiles.zip");
}
when i try to open this zip , windows says
“Windows cannot open this file.
Compressed folder (zip) with name [path] is not correct.”
Check the file contents using text editor. It’s possible you uri is incorrect and you actually downloaded a Google drive web page, rather than the actual file.
I think that might be problem (downloading page instead of file), but do You know how to actually download file but not webpage? I found out link to my dropbox .zip folder that instantly starts download, but after inserting it in my c# script there was error:
“Windows cannot open this file.
Compressed folder (zip) with name [path] is not correct.”
Thank You in advice.
I found solution!
I’d to use MediaFire and insert link that apears after clicking “download” button.
Thank You, Aurimas-Cernius!