Download via Batch Script

Automatically download files from a luckycloud link using a batch script

If you want to download a file from your cloud storage using a batch script, you can apply the following solution:

Using: Invoke-WebRequest '%url%' -OutFile '%FilePath%\file.zipdl=1 and the link appended with "dl=1", it is possible to download a specific file.

This is only feasible with a fixed link to the file and not with a changing file in a fixed folder.

The solution is completely possible with built-in tools from Win10 or from PowerShell Version 5. For Win7 or Win8/8.1, Windows Management Framework 5.1 must be installed. Then it will also run on older systems.

On some (especially older systems), the SecurityProtocol for the Invoke-Request must also be changed to Tls12. This can be done with: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12.