471,321 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Problem While doing Sftp

Hi Friends,

I tried to send some zips from local to remote location but the transfer is not sucess i can transfer the zips partially can some one assist me how to make it
as sucess

i had used the below code
Expand|Select|Wrap|Line Numbers
  1. #!/bin/sh
  3. /usr/local/bin/expect <<EOF
  5. spawn  sftp USERNAME@IPADDRESS
  6. expect "password:"
  7. send "Tgsf324a \r"
  8. expect "sftp> "
  9. send "cd /nas_ftp5/Customer/Troy/tbscclm/tmp/BSSFtp \r"
  10. expect "sftp> "
  11. send "lcd /forms/bscclmsa/outdata/bsca/b2collate/its/ready \r"
  12. expect "sftp> "
  13. send "put HOV_CLM_ATT_bsc20090223010100.md5 \r"
  14. expect "sftp> "
  15. send "lcd /forms/bscclmsa/outdata/bsca/b2collate/its/ready \r"
  16. expect "sftp> "
  17. send "put HOV_CLM_ATT_bsc20090223010100.zip \r"
  18. expect "sftp> "
  19. send "ls \r"
  20. expect "sftp> "
  21. send "bye "
  22. EOF
Thanks in advance
Feb 24 '09 #1
2 3709
1,275 Expert 1GB
R u getting any error when running the script?
Means when the file is uploaded did u get any error?
Do the normal FTP or scp works?

Feb 25 '09 #2
If you're using sftp, why not use scp: http://www.hypexr.org/linux_scp_help.php
Mar 6 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Peter A. Schott | last post: by
3 posts views Thread by Gus M. Creces | last post: by
4 posts views Thread by Luke Vogel | last post: by
2 posts views Thread by Mike | last post: by
4 posts views Thread by sa6113 | last post: by
7 posts views Thread by K Viltersten | last post: by
1 post views Thread by ndedhia1 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.