Topic "winscp not exit after the exit command"

Author Message
pshen
[View user's profile]

Joined: 2017-06-22
Posts: 1
WinScp 5.9.3 on Windows Server 2012R2

Hello experts,

I made a bat scheduled script running, in which it will check a sftp server to download file with winscp, and the code looks like:

Code:
%WINSCP_PATH%\winscp.com /log=%LOCATION_LOG% /command ^
       "open sftp://%FTP_USER%:%FTP_PASS%@%FTP_SERVER%/" ^
      "cd %LOC_FOLDER%" ^
      "get -transfer=binary *.zip %LOCATION_IN_FTP%\" ^
      "mv %LOC_FOLDER%/%%~ni.trg %LOC_ARC_FOLDER%/%%~ni.trg" ^
      "mv %LOC_FOLDER%/%%~ni.zip %LOC_ARC_FOLDER%/%%~ni.zip" ^
      "exit"


Normally it works fine, but sometimes (only sometimes), it will hang up.
In the log file, I can see the exit was called:

Quote:
. 2017-06-22 01:55:21.112 Copying 0 files/directories to local directory "/Integration/SrcFiles/JDE\loc\in\"
. 2017-06-22 01:55:21.112 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2017-06-22 01:55:21.112 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2017-06-22 01:55:21.112 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
> 2017-06-22 01:55:21.112 Script: exit
. 2017-06-22 01:55:21.112 Script: Exit code: 0
. 2017-06-22 01:55:21.112 Closing connection.
. 2017-06-22 01:55:21.112 Sending special code: 12
. 2017-06-22 01:55:21.112 Sent EOF message


But I can see winscp still running in the procecesses from the Task Manager, and the bat keeps running for more than 10 hours until I kill it the next day.

Why does this happen? and how can I avoid it?

Thanks in advance.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
Guest




I will download and have a try.
Thanks so much.

And also here's some more information:
I made 3 different batch files, runs every 5 minutes. And it normally hangs once after 3 or 5 days, and the last occurrence was 5 days ago. so very strange.

Anyway, I will try your version, and may take a long time to have the feedback.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License