SendFile Method

image\btn_example.gif

image\validfor_amv.gif

Applies To Objects

Session

Description

Sends a file from the PC to the host.

Syntax

object.SendFile [PCFile] [, HostFile] [, bQuiet]
-or-

rc = object.SendFile( [PCFile] [, HostFile] [, bQuiet] )
-or-

Set waitobj = object.SendFile( [PCFile] [, HostFile] [, bQuiet] )

Element

Description

object

The Session object.

PCFile

The name of the file to send to the host.

HostFile

The name of the file after it is transferred to the host.

bQuiet

Boolean value indicating whether the file transfer "status" dialog box should be displayed during the course of the file transfer. Default is TRUE..

rc

Return value for second syntax form above. TRUE if the file transfer was successful, FALSE if the specified file could not be located, the user canceled out of Transfer dialog box, or the file transfer was unsuccessful for any reason.

Set

The Set statement, required for assigning an object reference to a variable.

waitobj

A wait-type object.

Comments

If you do not specify HostFile or PCFile, a Transfer dialog appears in which you can select the files. Note that the SendFile and ReceiveFile Methods do not support FT5250 (SQL) file transfers. They do support 3270 IND$FILE transfers and FTP file transfers (using any host).

When either of the first two syntax forms above is used, SendFile will suspend execution of your macro or program (i.e. wait) until the file is sent, or a timeout or error occurs. If the third form is used, SendFile will return immediately and the wait-type object returned can be used with the Waits collection, which allows several separate events to be monitored simultaneously. For more information on this, see help for the Waits object.