File transferr using sftp through expect is partiall


I am doing automated file transfer using sftp, but every time file transferr for big files is partiall

but for the small files getting transferred fine, but for the big files once it is getting bye after 19%, another time 26%, each time it is diffrent, never crosses 26%

Thanks for the help
"spawn /usr/local/bin/sftp -v $user@$host ; expect "Password\"; send \"$pass\\n\"; expect \"sftp> \" ; send \"cd $Dir2 \\n\"; expect \"sftp> \"; send \"lcd $Dir1/$tmpDir \\n\"; expect \"sftp> \"; send \"get $File1 \\n\"; expect \"sftp> \"; send \"bye \\n\"; expect eof;";

Open in new window

Who is Participating?
mikelfritzConnect With a Mentor Commented:
You could try "set timeout 600" ,or some other number of seconds, before the spawn.
are you able to finish file transfer of bog files with interactive sftp? it could be that your network is congested and drops connections.
prakashagrAuthor Commented:
The manual transffer of the same file is sucessfull, but when we tried through automated script for the same big file it is getting partiall transferr
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.