Home / code

FTP upload Script

Writer: Christophe Wolfs
Published: 27 March 2008

This is a small bash script that can upload files or a complete directory. (for linux).
Actually its not bash, it uses expect. You can download expect at http://expect.nist.gov

#!/usr/bin/expect

spawn lftp -u username,password ftp.yoursite.com 
send "mput /todir*\r"
expect ransferred {send "quit\r"}

 

TOP