468,771 Members | 1,889 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

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
  2.  
  3. /usr/local/bin/expect <<EOF
  4.  
  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
  23.  
Thanks in advance
siva
Feb 24 '09 #1
2 3624
gpraghuram
1,275 Expert 1GB
Hi,
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?

Raghu
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
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.