No such file or directory error after lost connection and reconnect
Hi,
I have a problem with my cmd script.
The script will be executed by an ETL-process in a loop. In each loop interation the script just downloads one .txt files from the server (Filename will be graped from Database, ETL Process builds and executes the script for one file). Sometimes everything goes fine but sometimes the connection gets lost. When connection gets lost the script is reconnecting and trying to dowload the file again but at this point i always get the error "550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)"?
I can not explain why directory will not be found... If I retry execution the directory will be found and the file gets downloaded...
Can anybody give me a hint how to solve this problem?
code of Script:
Further information:
WinSCP version 5.15.3-portable
Win-Server 2016 Standard 64-bit
Transfer Protocol: FTP
Log file:
getDiaz.log (Shows 3 executions of the script, 2 Successful, 1 Failed with error "550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)")
I have a problem with my cmd script.
The script will be executed by an ETL-process in a loop. In each loop interation the script just downloads one .txt files from the server (Filename will be graped from Database, ETL Process builds and executes the script for one file). Sometimes everything goes fine but sometimes the connection gets lost. When connection gets lost the script is reconnecting and trying to dowload the file again but at this point i always get the error "550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)"?
I can not explain why directory will not be found... If I retry execution the directory will be found and the file gets downloaded...
Can anybody give me a hint how to solve this problem?
code of Script:
echo open ftp://Xexample:DIAexample@99.99.999.1:21 -explicit -hostkey="[myHostKey]" -passive=on >>%CMMSCRIPTS%\getDIAZ.tmp echo ascii >>%CMMSCRIPTS%\getDIAZ.tmp set FilePath=%1 echo CD //%FilePath:~0,16% >>%CMMSCRIPTS%\getDIAZ.tmp echo GET %FilePath:~17,8% %CMMROOT%\Inputdaten\J_DIAZ\getdiaz.txt >>%CMMSCRIPTS%\getDIAZ.tmp echo close >>%CMMSCRIPTS%\getDIAZ.tmp echo exit >>%CMMSCRIPTS%\getDIAZ.tmp %CMMSCRIPTS%\WinSCP-5.15.3-Portable\winscp.com /ini=nul /log=%CMMSCRIPTS%\getDiaz.log /script=%CMMSCRIPTS%\getDIAZ.tmp
Further information:
WinSCP version 5.15.3-portable
Win-Server 2016 Standard 64-bit
Transfer Protocol: FTP
Log file:
getDiaz.log (Shows 3 executions of the script, 2 Successful, 1 Failed with error "550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)")