Hey Alexander,

As there is not (yet !) a sort of mmirror command (which would allow to
mirror dirs matched by a regex), I emulated it with the help of a little
perl:

1. Write mini perl-script which transforms dirnames (with no spaces!)
into mirror cmds:
#!/usr/local/bin/perl
 $_=<STDIN>; 
 s!(.*?)/?\s!queue mirror -c -p \"$1\"\n!g; 
 print;

2. alias mmir "glob -d echo VA* | dirs2lftpcmds.pl >lftpcmds.1"

3. Open ftp the enter following commands :
lftp>mmir
lftp>source lftpcmds.1

This method wouldn't be too cumbersome, if alias had support for
arguments.
Then mmirror could be defined:

alias dirs2cmds "glob -d echo $1 | dirs2lftpcmds.pl >lftpcmds.1"
alias mmirror "dirs2cmds $1 ; source lftpcmds.1"

I hope, i did't miss any useful lftp command.


BTW, it would be cool to have parallel queue downloading (like the
mirror -p, thanx for that btw :)
A good idea would be a command (like "queue threads=3") which sets the
number of parallel threads.
Or maybe easier with a variable, which can be changed with the set
command.


thanx,

Laurent

Reply via email to