Post a reply

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

martin

srjones67 wrote:

"C:\Support\Utils\WinSCP\winscp" /script=C:\Support\Scripts\CorrectAddress\CA_Update_Get.txt /parameter "User:Password" "sftp.url.com" "/CorrectAddress/CAN" "C:\Support\Scripts\CorrectAddress\incoming\CAN\" "*.*" /loglevel=0 /log=C:\Support\Logs\CA_Update_Get_.log

...


You did not answer my question.
And I'm not getting "Too many parameters for command 'open'" error when running your code.

Though btw, doesn't your username or password contain a space?
srjones67

"C:\Support\Utils\WinSCP\winscp" /script=C:\Support\Scripts\CorrectAddress\CA_Update_Get.txt /parameter "User:Password" "sftp.url.com" "/CorrectAddress/CAN" "C:\Support\Scripts\CorrectAddress\incoming\CAN\" "*.*" /loglevel=0 /log=C:\Support\Logs\CA_Update_Get_.log


Contents of CA_Update_Get.txt

open sftp://%1%@%2% -rawsettings SendBuf=0

echo on

cd "%3%"

dir

lcd "%4%"

Get "%5%"

lls "%4%"

dir "%3%"

exit
martin

Re: Log File

srjones67 wrote:

Here is a log of what is occurring. I'm using WinSCP, Version 5.7.2 (Build 5316).

There's no "Too many parameters for command 'open'" error in the log.
Though actually there cannot be, such error won't be logged (it was a mistake for me to ask for a log file).
So I'm really confused what the log should show. Because it shows successful connect.

Anyway, show us your script and your WinSCP command-line for which the script is failing.
srjones67

Log File

Here is a log of what is occurring. I'm using WinSCP, Version 5.7.2 (Build 5316).
Vann_the_Red

Eerie Solution?

martin wrote:

Are you using the latest version of WinSCP?

If you are, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


I found this thread because I was experiencing the exact same problem as the OP. I turned on logging as Martin directed. It immediately started working. No idea why logging the session mattered, but that seems to have done it.

VtR
martin

Are you using the latest version of WinSCP?

If you are, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
srjones67

I'm getting this error with that change: Too many parameters for command 'open'.

This is my open command in CA_Update_Get.txt: open sftp://%1%@%2% -rawconfig SendBuf=0

I did remove the /rawconfig SendBuf=0 from the calling command. If I change -rawconfig SendBuf=0 to -rawsettings SendBuf=0 it seems to work.

Update: -rawconfig on open command yields too many parameters. -rawsettings gives no parameter error but still get try turning off 'Optimize connection buffer size.
martin

Re: Optimize connection buffer size

You have to add -rawconfig SendBuf=0 to the open command within the CA_Update_Get.txt
srjones67

Optimize connection buffer size

I am receiving the message that I have noted in the subject:

Host is not communicating for more than 15 seconds.
Still waiting...
Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
Warning: Aborting this operation will close connection!
(A)bort (58 s):

I made what I thought was the proper adjustment but it's still occurring. The transfer completes but I repeatedly get the error. This is the command that I am executing:

"C:\Support\Utils\WinSCP\winscp" /script=C:\Support\Scripts\CorrectAddress\CA_Update_Get.txt /parameter "user:pw" "site.url.com" "/CorrectAddress/Geocoder" "C:\Support\Scripts\CorrectAddress\incoming\Geocoder\" "*.*" /rawconfig SendBuf=0 /loglevel=0 /loglevel=0 /log=C:\Support\Logs\CA_Update_Get_2017-09-15.log

Any help would be appreciated.