ActiveXperts Network Component Tftp Object
Today, there are many TFTP client tools available. However, most of these software tools are stand-alone packages, without scripting options. Network Component is very well suited for scripting and embedding in applications.
Use the Network Component Tftp object to script the following:
- Connect to a remote FTP server;
- Download files (ftp 'get'), ASCII or binary;
- Upload files (ftp 'put'), ASCII or binary;
The Tftp object is part of the Network Component. Overview of all Network Component objects:
DnsServer & DnsRecord - Ftp & FtpFile - Http - Icmp - IPtoCountry - Msn - Ntp - Radius - Rsh - Scp - SFtp - Ssh - SnmpManager - SnmpTrapManager - SnmpMibBrowser - Tcp - Tftp - TraceRoute - Udp - Xen - Wake-on-LAN - Xen (Citrix)
Tftp Sample code
VBScript sample: Tftp get sample
Set objTftpServer = CreateObject ( "ActiveXperts.TftpServer" ) objTftp.Get "10.1.1.10", "/folder1/file.txt", "c:\\file.txt" ' Download file, save it locally Wscript.Echo "Get, result: " & objTftp.LastError If( objTftp.LastError <> 0 ) Then ' If download failed then quit WScript.Quit End If WScript.Echo "Packets received: " & objTftp.PacketsReceived ' Print download statistics WScript.Echo "Bytes received: " & objTftp.BytesReceived ' Print download statistics
You can download the full samples here.