As long as the numbers of files are less than 40 there is no issue.
But once it is over 40, the timeout always happen.
i make the script such that it can set the timeout base on the total files size.
This is the command which i use.
option batch abort
option confirm off
open sftp://firstname.lastname@example.org -timeout=100 -passive=on -hostkey="ssh-xxxxxxxxxxxxxxxxxx" -privatekey="D:\xxx_pri.ppk"
This are the log, only the starting and ending part.
Searching for host...
Connecting to host...
Using username "xxx".
Authenticating with public key "dsa-key-111111".
Starting the session...
Active session:  email@example.com
D:\X55271 | 0 B | 0.0 KB/s | binary | 0%
D:\X55271 | 0 B | 0.0 KB/s | binary | 0%Timeout waiting for external console to complete the command.
Timeout waiting for external console to complete the command.