I have a script that is run from winscp3.com that first tries to "put" a file and then "call" to run a script on the remote server. This works OK but the process runs a lot slower than I would expect. It can takes on average 40 seconds to transfer the file and run the script.

I can see in the scp.log there seems to be a delay of 30 seconds between the file transfer finishing and the remote command executing. I don't think file transfer speed is the issue as the files being transfered are small (less than 2k bytes).

Do you have any idea what may be causing this delay or how I could get around it ? Is there any parameter that I could adjust to reduce or remove it ?

If you are using SFTP protocol, the first "call" requires opening separate shell session, which may take some time. Would that explain it?

Thanks that explains part of it. I've run the commands the in the script by hand it takes about 10 seconds for the initial "open" to finish, the "put" takes under a second, then as you say the "call" makes a seperate connection and shell but this takes about 30 seconds which seems like a long time. So it seems like the delays happening are when exstablishing a connection. Is there any way to reduce these times?

Setting up shell session may take longer due to setup WinSCP does for compatibility reasons. Some steps of the setup maybe omitted in most cases to speedup connection. Please read documentation._________________Martin Prikryl