Hi,
I'm using an script and run it from the command line.
This is perhaps not the best way, but it's working fine. I call the batch file from VB and than search in the log file to the 226 Transfer successfully.
This is the content of the batch script
@REM *********************************************************
@REM * This script is written to send a file to an remote *
@REM * host with the specifications expressed in the *
@REM * command line of the script *
@REM * *
@REM * Usage : MSO_FTP 1 2 3 4 5 *
@REM * *
@REM * 1 Host name of ip-address of the host *
@REM * 2 Username used to logon on the ftp session *
@REM * 3 Password used to logon on the ftp session *
@REM * 4 Datafile to send/receive *
@REM * 5 Logfile name + path *
@REM * 6 Checkfile name + path *
@REM * *
@REM *********************************************************
@REM * Author : Marc Seys, aOP *
@REM * Date : 08/03/2001 *
@REM *********************************************************
@REM * Please change only the 'SET' AND NOT THE SCRIPT *
@REM *********************************************************
@REM ******************** SET SECTION ************************
@set ftp_script_file=C:\MSP_LAB\BIN\SEND.TXT
@set ftp_log_file= %5
@set ftp_global_log_file =C:\MSO_SCAN\LOGBOOK\FTP_LOG.TXT
@set ftp_data_file= %4
@set ftp_check_file=%6
@set ftp_username=%2
@set ftp_password=%3
@set ftp_host=%1
@REM ********************* SCRIPT SECTION ********************
@REM **** Prepare : Deleting old files ****
@if exist %ftp_script_file% del /q %ftp_script_file%
@REM **** Make sure that the data file exists ***
@if exist %ftp_data_file% goto step1
@exit1
@:step1
@REM *** Creation of script file ***
@ECHO open %ftp_host% >%ftp_script_file%
@ECHO user %ftp_username% %ftp_password% >>%ftp_script_file%
@ECHO bell >>%ftp_script_file%
@ECHO cd pizaop01/WILLETT/BE1001 >>%ftp_script_file%
@ECHO put %ftp_data_file%>>%ftp_script_file%
@ECHO quit >>%ftp_script_file%
@REM *** EXECUTION SCRIPT FILE ***
@:step2
echo step2
ftp -n -i -s:%ftp_script_file% >%ftp_log_file%
date /t >%ftp_check_file%
time /t >>%ftp_check_file%
@findstr "226" %ftp_log_file% >>%ftp_check_file%