DownloadFile

Use to download a file from the Web server to a client computer.

Syntax

void DownloadFile (string serverFile, boolean open)

Parameters

Returns

None.

Examples

Usage

Some types of files cannot be viewed directly in a browser window. For these types of files, the open argument is disregarded. Instead, the File Download dialog box appears, as if you set the open argument to false, but the dialog box provides no option to open the file directly. In this case, users can only save the file to disk or cancel the download operation.

If the file you indicate in the serverFile argument is not present on the server, application users do not see an error message. You can use the FileExists PowerScript function to make sure the file exists in the server directory before you call DownloadFile.