Download command does not follow redirects on Windows

I have a package that needs to download a library from sourceforge. On windows, the download command does not follow redirects. I found that the microsoft function that is used by Julia is not able to follow redirects. Is there any other ways to download from sourceforge on windows?
Here’s the code that works on Linux, but not on windows:

download("", "libcoolprop.dll")

Can you get curl for Windows? I think that can do redirects. I think I had to use curl for my PhilipsHue hack.

I think it’s generally agreed that we need to improve the download implementation on Windows, but nobody has done the work yet. See this link (and linked URLs):

Thank you for your help. I use curl until a better solution is found.

readall(`curl -L -o libcoolprop.dll`)

Note that it’s a lot less likely for a curl executable to be installed and on the path for users on Windows, so this will not be very reliable. You can try BinDeps.download_cmd which uses powershell, which is always installed on Windows.

Thank you Tony. You are right. The curl command did not work on my windows machine. Now I use the following and it works fine:

lib_coolprop_path=joinpath(Pkg.dir(), "CoolProp", "deps", "libCoolProp.dll")
readall(BinDeps.download_cmd(lib_coolprop_win_url, lib_coolprop_path))