package prBatch_Secure;
public class jcdBatchSFTP
{
public com.stc.codegen.logger.Logger logger;
public com.stc.codegen.alerter.Alerter alerter;
public com.stc.codegen.util.CollaborationContext collabContext;
public com.stc.codegen.util.TypeConverter typeConverter;
public void receive( com.stc.connector.appconn.file.FileTextMessage input,
com.stc.connector.batchadapter.appconn.sftp.SFTP BatchSFTP_1 )
throws Throwable
{
// get, make directory, change directory, put, rename, delete
BatchSFTP_1.getConfiguration().setLocalDirectory( "C:/BatchSecurity/SFTP" );
BatchSFTP_1.getConfiguration().setLocalFile( "SFTP_from_remote.txt" );
BatchSFTP_1.getClient().get();
BatchSFTP_1.getClient().mkdir( "BatchSecurity/new_SFTP" );
BatchSFTP_1.getClient().cd( "BatchSecurity/new_SFTP" );
BatchSFTP_1.getConfiguration().setRemoteDirectory( "" );
BatchSFTP_1.getConfiguration().setRemoteFile( "SFTP_to_remote.txt" );
BatchSFTP_1.getClient().put();
BatchSFTP_1.getClient().rename( "BatchSecurity/new_SFTP/SFTP_to_remote.txt",
"BatchSecurity/new_SFTP/renamed_SFTP_to_remote.txt" );
BatchSFTP_1.getClient().delete( "BatchSecurity/useless_SFTP.txt" );
}
}
|