# Download File

Save a file from the internet to the User's computer.

<table data-header-hidden><thead><tr><th width="221" valign="top"></th><th width="332" valign="top"></th></tr></thead><tbody><tr><td valign="top">URL</td><td valign="top"><p>[Text] Link to the file that needs to be downloaded.</p><p>Must start with a protocol, for example,</p><p><code>"http://www.mydomain.com/myfile.zip"</code>.</p></td></tr><tr><td valign="top">File Name</td><td valign="top"><p>[Text] The name of the file with which to save the downloaded file on the User's computer.</p><p>You can enter the full file name including the path. If you specify only the file name, it will be created in the Robot's working folder. If you specify a full or relative path, it will be saved where you indicate.</p></td></tr><tr><td valign="top">Auto-Extension</td><td valign="top">If enabled, the extension of the specified file name will be replaced with the extension that the server provides when downloading the file.</td></tr><tr><td valign="top">UserAgent</td><td valign="top">UserAgent to be used when downloading.</td></tr><tr><td valign="top">TLS 12</td><td valign="top"><p>If checked, the secure TLS 12 protocol will be used when accessing the</p><p>Web page.</p><p>Otherwise, the outdated TLS 11 protocol will be used.</p></td></tr><tr><td valign="top">Headers</td><td valign="top">[Dictionary] Headers passed in the request.</td></tr><tr><td valign="top">Cookies</td><td valign="top"><p>[List] List of cookies. This property should contain a list of Cookie objects.</p><p>The list can be obtained using the "Data Table in Cookies" block, using the "Get Cookies" block from the "Browser Automation" palette, using the output property "Cookies" of this block.</p></td></tr><tr><td valign="top">Login</td><td valign="top">[Text] Login for basic authentication. An Authorization header is created.</td></tr><tr><td valign="top">Password</td><td valign="top">[Text/SecureString] Password for basic authentication. An Authorization header is created.</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] Timeout in seconds.</td></tr><tr><td valign="top">Alternative Method</td><td valign="top">The alternative method uses the base class WebClient.</td></tr><tr><td valign="top">Response Code</td><td valign="top">[Number] HTTP response code.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation.</p><p>Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>
