Trying to do the following, and it looks like Expect is probably my best bet. Any help greatly appreciated
1) Log onto ftp site
2) Go to folder
3) GET all files matching basename*.txt
4) MOVE those files to a subfolder on the ftp site. I don't need to move it on MY computer, I want to move the files on the site to a subfolder, so that if there are any problems the files are still accessable. This is acceptable by the site owner.
Example:
spawn ftp myftp
expect "username:"
send "hi\r"
expect "password:"
send "mom\r"
expect "ftp>"
send "prompt\r"
expect "ftp>"
send "cd getme\r"
expect "ftp>"
send "mget basename*.txt\r"
expect "ftp>"
(code I need - move all files I just got to folder getme\processed)
send "bye\r"
expect eof