I need to run this chain of commands
psftp xx.xx.xx.xx -l xxx -pw yyy
cd zzzzzz
get file.csv
bye
in one single command line
(psftp comes from here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
I have seen on superuser (https://superuser.com/a/532528/290138) that with ftp you can do it like this but I don't understand how it works:
echo open xx.xx.xx.xx >> ftp & echo user xxx yyy >> ftp & echo binary >> ftp & echo get file.csv >> ftp &echo bye >> ftp & ftp -n -v -s:ftp & del ftp
Thanks!
[EDIT]
I wrote those 4 lines in a .bat
file and ran it.
The first line executes well, but then the psftp interpreter opens (it's like the ftp interpreter)
and the second line never happen