Converting FTP to SFTP using LFTP


#1

We are shutting down FTP and will only be able to use SFTP. I currently use wget to copy several directories and files to our server depending on the results of a Perl script which parses through the directories looking for new files. The file that downloads these files is in the format below.

ftp://server/directory/state/date/filename
There can be 1 -n entries in the file. This file is currently the input used for wget. It doesn’t appear that SFTP has a way to input a file, although lftp does. In most cases we are wrapping some sftp commands with lftp. Does anyone know what format the input file to lfpt looks like? Also with sftp, I am planning on using the mirror command with exclusions. After reading a line in the lftp wrapper, does it automaticaly process the data in the sftp command. ?

What I am trying to replace is.

/usr/bin/wget --user=$FTP_UID --password=$FTP_PWD --directory-prefix="${WORK_DIR}/" --reject="_" --reject="+" --recursive -nv --no-host-directories --force-directories --cut-dir=0 --no-remove-listing --input-file=${WORK_DIR}/ftp.${VERSION_DATE}.lst