Back to product page

SendFile method


Sends file using specified protocol (ZMODEM).

Syntax

  • Basic
object.SendFile (Protocol, Filename, [ResumeTransfer], [ShowWindow])
The SendFile(object,Protocol,Filename,ResumeTransfer,ShowWindow) syntax has these parts:
objectAn expression evaluating to an object of type wodTelnetDLX
ProtocolA TransferProtocolsEnum enumeration. Protocol to use for sending file (currently only ZMODEM is supported).
FilenameFull path to a file that will be sent. No wildcards are supported at this time.
ResumeTransferOptional. A Variant value. Should be set to True if you allow file transfer to be resumed, or False if you want to overwrite remote file.
ShowWindowOptional. Exists only in GUI version of wodTelnetDLX. A Variant value. Determines if transfer window will be shown during the transfer.

Remarks

SendFile method is used to send file to the server using any of supported protocols (ZMODEM is currently only supported protocol). It is assumed that server has appropriate tools to accept such file transfers (UNIX systems usually have rz and sz commands to receive and send files). wodTelnetDLX will not send these commands before transfer is started - so it is suggested you send them manually before you call this method.

Typically you can do this:
 
Private Sub Command1_Click()
 wodTelnetDLX1.Send "rz" & vbLf
 wodTelnetDLX1.SendFile ZMODEM, "c:\myfile.dat"
End Sub
 

to send a file. When transfer starts, TransferStart event will be fired. When transfer completes, TransferEnd event will fire.

Platforms

Windows