Topic "exit closes batch in beta"

Author Message
Someguy

Guest


I have a DOS batch file that contains the following:
Code:
@echo off
winscp.com /command "open test_session" "option batch abort" "option confirm off" "get test.dat" "close" "exit"
echo %errorlevel%


Using beta 5.0.6, the last echo is not done. It seems that the exit closes the batch. Using 4.3.7 I get the errorlevel.

Also, in beta, the new line in the stdout is only "0A" instead of "0A 0D".

Thanks.
Advertisements
Someguy

Guest


"0A 0D" should be "0D 0A"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Thanks for your report.
I will take a look at this issue.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Someguy wrote:
I have a DOS batch file that contains the following:
Code:
@echo off
winscp.com /command "open test_session" "option batch abort" "option confirm off" "get test.dat" "close" "exit"
echo %errorlevel%


Using beta 5.0.6, the last echo is not done. It seems that the exit closes the batch. Using 4.3.7 I get the errorlevel.

I cannot reproduce the problem. For me the errorlevel is printed.

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.


Quote:
Also, in beta, the new line in the stdout is only "0A" instead of "0A 0D".

This issue has been added to tracker:
https://winscp.net/tracker/show_bug.cgi?id=812
Someguy
[View user's profile]

Joined: 2012-03-09
Posts: 9
Mail sent.
Someguy
[View user's profile]

Joined: 2012-03-09
Posts: 9
I think I have further tracked down the problem.
When running winscp.com in a DOS session and then immediately exit without any action, after I am not able to run any batch script in the same DOS session.

Example:
Code:
C:\TEMP\1>test_scp.cmd
I am here

C:\TEMP\1>winscp.com
winscp> exit

C:\TEMP\1>test_scp.cmd

C:\TEMP\1>test_scp.cmd

C:\TEMP\1>


test_scp.cmd contains:
Code:
@echo I am here


Tried this on Windows XP.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Thanks for your investigation.

This bug has been added to tracker:
https://winscp.net/tracker/show_bug.cgi?id=814
Advertisements

You can post new topics in this forum






Search Site

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