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.

Options
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)

Options

Topic review

charmtg

No log when missing quote marks

Colleagues,

I have the following script (with some details removed) which I'm calling with parameters.
option batch off
option confirm off
open "sftp://%1%:%2%@ftp.domain.com/%3%" -hostkey="ssh-rsa 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
option transfer binary
get "Filename prefix containing spaces*.xlsx" %4%
mv "Filename prefix containing spaces*.xlsx" "Retrieved/"
close
exit

WinSCP is executed from an SSIS package with the following arguments (again, some details removed).
/log=\\server\path\to\WinSCP.log /loglevel=0 "-script=\\server\path\to\DownloadScript.txt" /parameter // Username Password "Directory name containing spaces" \\server\path\to\put\files\

This works perfectly.

But here's my concern. When I didn't (I do now, because I finally figured out this was my problem) have double-quote marks around "sftp://%1%:%2%@ftp.domain.com/%3%", this failed. Okay, I get it. The open command was being sent invalid arguments.

However, my concern is that this wrote nothing to the WinSCP.log. I would have expected the log to show that WinScp was executed, what the command line was, and an error to the effect of a malformed open command line.

Not having that log information made this error more difficult to track down than it probably should have been.

I'm currently using "WinSCP, Version 5.7.7 (Build 6257)". My apologies if this is already fixed in a new version -- my organization tends to be slow to install updates. If this is fixed in an update, perhaps it will help me justify updating WinScp. :)

I'm not attaching a log because my problem is that nothing was logged.

Thanks,

Matt