Apparently that loop failed, it was placing the actual '$file' as the filename. If there is no list option for filenames then I'll have to look into writing an lftp script.

Thanks.

Ken Garland wrote:

I have seen this asked a few times in the list, but I was unable to locate an answer or even a reply. What I would like to do is download a list of files contained in a text file using lftp. Something like so:

lftp --file-list download

The file download would contain:
file1.tar
file2.tar
file3.tar
file4.tar

This is what I'm  doing currently:

#!/bin/bash
for file in `cat download`; do
  lftp -u <user>,<pass> <host> -e 'get $file; exit';
done

Which would take a considerable amount of time with a long list of files instead of using one instance of lftp to download multiple files.

- Ken


Reply via email to