How can I change a scripted ftp upload to lftp for High Sierra?

Solution 1:

From looking at the lftp man page it seems as if lftp is scriptable. Something like the following should work (untested):

# upload script (save as website-update.lftp)
open server121.web-hosting.com
cd public_html
lcd /Applications/PlexEmail/streamnet/
put index.html
cd images
lcd images
mrm *.jpg
mput *.jpg
exit

And then use

lftp -f website-update.lftp

to execute it.

PS: lftp also has a mirror command which would this make even easier, probably.