WinBatch help need ASAP. I have following code to FTP our WinBatch file to msn server.
;Run asp page to create data file
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "http://our_IP/dbutils/SearchEngine/MSN/MSN_Shopping.asp")
WinWaitExist("MSN Shopping", -1)
TimeDelay(5)
WinClose("MSN Shopping")
;Start FTP process
AddExtender("WWWSK34i.DLL")
;host="our_host"
host="ftp.eshop.msn.com"
userid="CompanyName"
pswd="our_password"
acct=""
hSession=ftpOpen(host,userid,pswd,acct,1)
if !IsNumber(hSession)
Message("MSN FTP Open Error",hSession)
exit
endif
ftpChdir(hsession,"/3046/ftp")
rs=ftpPut(hSession, "\\our_IP\Web02_Intranet\dbutils\searchengine\MSN\MSN_Shopping.txt", "MSN_Shopping.txt", "A")
ftpClose(hSession)
if rs == "" then
;Change successful to true in logfile table for this process
Run("\\our_IP\Web02_Intranet\dbutils\SearchEngine\MSN\msnshopping.bat","")
WinWaitExist("finish_msnshopping.asp", -1)
TimeDelay(5)
WinClose("finish_msnshopping.asp")
else
message("ERROR --- MSN ftpPut returned",rs)
endif
It is work fine except sometime it getting frozen and doesn’t return any error, it’s just working without success. So.. I am trying to modify WinBatch file to timeout after 15 minutes and initiate and automatic retry. |