Tivoli Directory Integrator, Version 7.1.1

The FTP object

The FTP object is available as a scriptable object. This object is useful when the FTP Client Connector does not provide the required functionality. See the full documentation in the Javadocs for com.ibm.di.protocols.FTPBean.

Example

var ftp = system.getFTP();

if ( ! ftp.connect ("ftpserver", "username", 
		"password") )
{
	task.logmsg ("Connect failed: " + 
		ftp.getLastError());
}

ftp.cd ("/home/user1");
var list = ftp.dir();
while ( list.next() )
{
	if (list.getType() == 1)
		task.logmsg ("Directory: " + 
			list.getName());
	else
		task.logmsg ("File: " + list.getName());
}

ftp.setBinary();
ftp.get ("remotefile", "c:\\localfile");
ftp.put ("c:\\localfile", "remotefile");
[ Top of Page | Previous Page | Next Page | Contents | Terms of use | Feedback ]
(C) Copyright IBM Corporation, 2003, 2012. All Rights Reserved.
IBM Tivoli Directory Integrator 7.1.1