Hi,
I have a windows script which ftp’s the files from one location to another unix location
I need to check whether the ftp was successful or not.
How can I do the needful?
Here is the code
echo FTP to userevr – File Verification Started >>%LOGFILE%
IF NOT EXIST D:\rs_survey_result.txt GOTO DoNotFTP
IF NOT EXIST D:\rs_survey_error.txt GOTO DoNotFTP
IF NOT EXIST D:\rs_scheduled_survey.txt GOTO DoNotFTP
IF NOT EXIST D:\rs_scheduled_survey_set.txt GOTO DoNotFTP
echo FTP to userevr – All files are present >>%LOGFILE%
ftp -s:D:\FTPto.sh >>%LOGFILE%
echo %errorlevel% >>%LOGFILE%
echo FTP to userevr Completed >>%LOGFILE%
echo. |time |find “current” >>%LOGFILE%
code for FTPto.sh is as follows :-
open userver
test
teset12010
cd out
put D:\rs_survey_result.txt
put D:\rs_survey_error.txt
put D:\rs_scheduled_survey.txt
put D:\ rs_scheduled_survey_set.txt
bye