lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

multiple path containing wildcards do not work with mget or glob #499

Open tolot27 opened 5 years ago

tolot27 commented 5 years ago

If I want to download multiple files containing wildcards with one mget command, some files are not found.

mget: /vol1/fastq/SRR699/009/SRR6997119/*.fastq.gz: no files found                           
/vol1/fastq/SRR699/008/SRR6997118/SRR6997118_2.fastq.gz' at 24275 (0%) 4.3K/s eta:8d6h [Receiving data]   

Using glob -- mget ... does not work either because it looks like glob only parses the first file argument of mget.

Even glob echo alone retrieves just the files of its first wildcard argument:

lftp -v -c "open ftp://ftp.sra.ebi.ac.uk; glob echo /vol1/fastq/SRR699/008/SRR6997118/*.fastq.gz /vol1/fastq/SRR699/009/SRR6997119/*.fastq.gz"
/vol1/fastq/SRR699/008/SRR6997118/SRR6997118_1.fastq.gz /vol1/fastq/SRR699/008/SRR6997118/SRR6997118_2.fastq.gz
qtv commented 5 years ago

Does glob -f -- pget *.fastq.gz work for you? That is what I've always used with success. Not to say there isn't an issue with mget.

tolot27 commented 5 years ago

pget accepts only one file parameter, mget multiple file parameters. If I use mget with just one wildcard parameter, it works, as pget do so. The problem here is two-fold (or two separate issues). glob seem to process only the first pattern and not multiple patterns. mget can deal with multiple wildcard file patterns but sometimes fail to resolve the wildcards.

lavv17 commented 5 years ago

glob expands its all arguments but the first one, which is a command to execute after expansion.