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("https://sourceforge.net/projects/coolprop/files/CoolProp/6.1.0/shared_library/Windows/64bit/libCoolProp.dll/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): https://github.com/JuliaPackaging/WinRPM.jl/issues/40

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

readall(`curl -L -o libcoolprop.dll https://sourceforge.net/projects/coolprop/files/CoolProp/6.1.0/shared_library/Windows/64bit/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")
lib_coolprop_win_url="https://sourceforge.net/projects/coolprop/files/CoolProp/6.1.0/shared_library/Windows/64bit/libCoolProp.dll/download"
readall(BinDeps.download_cmd(lib_coolprop_win_url, lib_coolprop_path))