I need to upload a large number of images from lots of local folder to ftp folders with other names. I have a CSV file with match between local and remote folder, such as:
/local/folder/A, /remote/folder/10 /local/folder/B, /remote/folder/13 /local/folder/C, /remote/folder/150
and I am trying to upload in
/remote/folder/10 all the files contained in
/local/folder/A and so on. I'd prefer bash script.
This is the script I already wrote:
#!/bin/bash HOST=ftp.xxx.it USER=yyy PASSWD=zzzz ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD lcd /first/local/folder cd /first/remote/folder mput *.jpg quit END_SCRIPT exit 0
As I said, I have got a CSV file with the couple of folders (local/remote) correctly matched, but I don't know the way to insert the CSV information in this script.