FGet.exe - Download a file

FGet.exe downloads a single file using the HTTP, HTTPS, FTP or FILE protocols. It is a small program (16 KB) that can be used to download files during installation by running it in a custom action (QuickInstall) or Run Program action (ExpertInstall and Installer 5).

Syntax

FGet /?
FGet [/f][/p][/q][/v][/wn] URL [localpath]

The first form displays a syntax summary and exits. The second form tries to download the file given by URL and store it locally.

Parameter Description
FGet Name of the program; .exe is implied. You may have to use a fully qualified file path if FGet.exe is located in a folder that does not appear in your PATH environment variable.
/? Display a message box with version info and syntax summary; exit when the user closes the message box.
/f Force output. If this parameter is given, FGet will overwrite the existing local file even if it's read-only. Without this parameter, an existing read-only local file will be preserved and no download takes place.
/p Uses passive FTP if the FTP protocol is specified in the URL; has no effect on other protocols. Passive FTP is recommended for compatibility with firewalls.
/q Run in quiet mode, i.e., without displaying progress information. Without this parameter, FGet displays a progress dialog box during the download. The /q option cancels any previous /v option.
/v Run in verbose mode, i.e., display progress information and error messages, if any. Also display a message box when the download is complete. The /v option cancels any previous /q option.
/wn Wait for up to n seconds after the download completes until the file is available. Even after FGet completes the download and closes its handle to the local file, the local file is not always immediately available for re-opening, presumably due to Windows internal caching. With this parameter, FGet will repeatedly try to open the local file and only exit after it succeeds or the wait period expires.
URL

Fully qualified URL of the file that must be downloaded. This can take on one of the following forms:

  • http://server/path/to/file
  • https://server/path/to/file
  • ftp://server/path/to/file
  • file:///path/to/file

In all cases, server must be a server address that is valid for the protocol (for example, www.tarma.com for HTTP and HTTPS; ftp.tarma.com for FTP); it may include protocol-specific qualifiers such as www.tarma.com:8080 (a port number for HTTP) or username@ftp.tarma.com (a user name for FTP). Note that for the FILE protocol the server portion is empty; hence the three consecutive /// characters in that case.

/path/to/file is the fully qualified path to the file on the server.

localpath Optional file name or path for the local copy of the download file. If this parameter is missing, then FGet will use the file (rightmost) component of the URL parameter as the local file name of the download file.

Remarks

The current version of FGet does not allow for interaction during the download process. This means that you cannot use it for downloads that require proxy or server-side authentication. You can use FGet across transparent proxies (i.e., proxies that do not require authentication).

Examples

Here are some usage examples.

FGet /?
Displays a message box with the syntax summary and version info, and exits when the message box is closed.
FGet http://www.tarma.com/download/update.txt
Downloads the file update.txt from Tarma's web server and stores it in the current directory under that same name. During the download process, a progress indicator is shown.
FGet /w10 /q http://www.tarma.com/download/update.txt C:\Temp\Test.ini
Downloads the same file but stores it in C:\Temp\Test.ini. No progress indicator is shown, and FGet waits up to 10 seconds after the download completes for the file to become locally available.

Home | Installer 5 | ExpertInstall 3 | QuickInstall 2 | Buy online | Download | Support
Copyright © 1990-2008 Tarma Software Research Pty Ltd
. All rights reserved.
This page was last modified on 16/07/08 15:41