I have been trying to find a way to use mget
with only certain file extensions.
I have used following command (which works just fine if I leave *.csv
)
lftp -e "set xfer:clobber true;mget $SOURCE_DIR*.{csv,txt,xls,xlsx,zip,rar};exit" -u $SOURCE_USERNAME,$SOURCE_PASSWORD $SOURCE_SERVER || exit 0
But no luck, I get message dir/*.{csv,txt,xls,xlsx,zip,rar} no files found
Tried to add parenthesis
lftp -e "set xfer:clobber true;mget $SOURCE_DIR(*.{csv,txt,xls,xlsx,zip,rar});exit" -u $SOURCE_USERNAME,$SOURCE_PASSWORD $SOURCE_SERVER || exit 0
Also no luck
$SOURCE_DIR
already has a slash /
at the end
I tried to test lftp locally but I have problem with opening ports on my Vagrant box, hence the question