Jump to content

INetDownloader UDF


PartyPooper
 Share

Recommended Posts

A simple UDF that can be used for downloading files via the internet. Includes a progress bar. Useful UDF for scripts that download files rather than having to code it in all the time.

Sample usage:

#include <INetDownloader.au3>
   
Global $s_MyWebSite = "http://members.optusnet.com.au/partypooper"; authors web address
           
OnDownloadFile()
           
Func OnDownloadFile()
  _INetDownloader($s_MyWebSite, "Program.exe", -1, @DesktopDir)
EndFunc;==>OnDownloadFile

Format for the UDF is as follows:

#include <INetDownloader.au3>
   
Func _INetDownloader( Web Site, Remote Filename [, Local Filename [, Download Directory [, AutoOverwrite]]] )

Parameters

Web Site - website containing the file

Remote Filename - filename to be downloaded.

Local Filename - filename to be saved. Default (-1) = same as Remote Filename

Download Directory - directory where file will be saved. Default (-1) = @TempDir

AutoOverwrite - specifies whether or not to overwrite local file if found. Default (-1) = Yes

Return Value

On Success: Downloads and auto installs (if chosen), the update.

On Failure:

- sets @ERROR = 1 for function parameter errors

- sets @ERROR = 2 if internet problems or file not found

- sets @ERROR = 3 if file exists and is not overwritten

Remarks

Nil.

Edit1: Updated UDF source - several bugfixes (24 downloads)

NO LONGER BEING MAINTAINED - superseded by @InetFileUpdate

Edited by PartyPooper
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...