Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Script Retrying success statements as well instead of only failed

Hello Team,

I have list of files to be downloaded/transfer from a remote server to my local server. When one of the file got failed then script is retrying all the files again. But i need to retry only failed file. Please help with a solution.

I am using below scritp.

@echo off

set TRIES=0
winscp.exe /console ^
      /script=E:\AutoMIS\Airtel_Daily\log.tmp ^

if %ERRORLEVEL% neq 0 (
   set /A TRIES=%TRIES%-1
   if %TRIES% gtr 1 (
       echo Failed, retrying in %INTERVAL% seconds...
       timeout /t %INTERVAL%
       goto retry
   ) else (
       echo Error!
       sendmail.exe -t < error_mail.txt
       exit /b 1

echo Success
sendmail.exe -t < success_mail.txt
exit /b 0