Back to product page

ReceiveFile method


Receives file using specified protocol (ZMODEM).

Syntax

  • Basic
object.ReceiveFile (Protocol, [Filename], [ShowWindow])
The ReceiveFile(object,Protocol,Filename,ShowWindow) syntax has these parts:
objectAn expression evaluating to an object of type wodTelnetDLX
ProtocolA TransferProtocolsEnum enumeration. Protocol to use for receiving file (currently only ZMODEM is supported).
FilenameOptional. Full path where received file will be stored. It can be provided later on in TransferStart event.
ShowWindowOptional. Exists only in GUI version of wodTelnetDLX. A Variant value. Determines if transfer window will be shown during the transfer.

Remarks

ReceiveFile method is used to receive file from the server using any of supported protocols (currently only ZMODEM is supported). It is assumed that server has appropriate tools to send file using this protocol.

At a time ReceiveFile method is called, you can specify where to save received file (by specifying Filename argument). But, you will also have a chance to specify local path in TransferStart event.

Filename argument should be used by environments where events are not available (such as VBScript or ASP).

wodTelnetDLX will not send commands to the server to initiate transfer - it will just start receiving file. You should send any necessary commands before calling ReceiveFile. Most common UNIX command to send a file is sz.

For example, you can do this:
 
Private Sub Command2_Click()
 wodTelnetDLX1.Send "sz /home/joe/myfile" & vbLf
 wodTelnetDLX1.ReceiveFile ZMODEM, "c:\my documents\myfile"
End Sub
 


Platforms

Windows