Topic "Bug #454 not really solved?"

Author Message
Rolf

Guest


I use WinSCP 4.2.3. on Windows Server 2003 R2 Standard Edition Service Pack 2.
From an application I call a batchfile called WinSCP_send.cmd as follows:
Code:
Winscp_send hostname username password "/usr/sapio/BE2/c4/dtaus/" "D:\dir withblank\filename"

I need the double-quotes here, because the path\filename within the double-quotes is one command line parameter.

In the batchfile, I take the command line parameters and invoke WinSCP as follows:

Code:
WinSCP.com /command "option batch on" "option confirm off" "open %2%:%3%@%1%" "put %5% %6%" "exit" >> %RESPONSEFILE% 2>>&1

In the RESPONSEFILE I 'echo' the filename and see, that the filename is complete including the double-quotes.

Here, WinSCP takes D:\dir as the file and withblank\filename as an unknown command. This behavior does NOT change if I use additional double quotes around Parameter 5, like:

Code:
WinSCP.com /command "option batch on" "option confirm off" "open %2%:%3%@%1%" "put "%5%" "%6%"" "exit" >> %RESPONSEFILE% 2>>&1


or additional double double-quotes, like

Code:
WinSCP.com /command "option batch on" "option confirm off" "open %2%:%3%@%1%" "put ""%5%"" ""%6%""" "exit" >> %RESPONSEFILE% 2>>&1

It never works.
If I open a dos-box (cmd) and call WinSCP.com without using a batchfile, it works.

Am I doing wrong, or is bug 454 only partly fixed?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for your post. This bug has been added to tracker.
_________________
Martin Prikryl
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