Hi,

You could:

slot source
mget -O slot:dest *.rar 

For the mirror and mkdir -p go and edit MirrorJob.cc and comment that line:

    662          ArgV args("mkdir");
    663          if(parent_mirror==0)
    664 //  Patch to avoid mkdir -p on mirror
->  665 //          args.Append("-p");
    666 //
    667          args.Append(target_session->GetFileURL(target_dir));
    668          char *cmd=args.CombineQuoted();
    669          fprintf(script,"%s\n",cmd);
    670          xfree(cmd);
    671          if(script_only)
    672             goto pre_CHANGING_DIR_TARGET;
    673       }


Regards.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Big Brother (BigB3)
Sent: jueves, 21 de julio de 2005 10:01
To: [email protected]
Subject: Re: A suggestion about LFTP: 'mirror' and -O support

On 7/21/05, Alexander V. Lukyanov <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 21, 2005 at 09:12:37AM +0300, Big Brother (BigB3) wrote:
> > => I have tried mirror but does not support -O ftp://.... parameter.
> > Mirror seems
> > to work only locally.
> 
> mirror does not support -O, because it does not need to:
> 
>         mirror ftp://site1/dir1 ftp://site2/dir2
> 
> --
>    Alexander..
> 



I know about this, but this cause problem because:

a) You do not use slots this way and you have to issue a 'pwd' on the
first server to copy paste the full URL. The problem is big when you
have entered many subdirectories inside.

You have to know the full path...(now I have to copy paste this)

ftp://aa:[EMAIL PROTECTED]/incoming/for_friends/disk1/movies/bigb3

In case the -O switch was used I just had to type
-O slot:a  (which would carry the full path) and it will be OK

b)BUT the major problem is:  Even If I copy paste the full path the 
mirror tries to create the directories EVEN though they exist. My
previous example..If I use

mirror My.Movie
ftp://aa:[EMAIL PROTECTED]/incoming/for_friends/disk1/movies/bigb3

it will try to do
mkdir -p /incoming/for_friends/disk1/movies/bigb3

which means that it will first do:

mkdir /incoming (even though IT DOES exist and MUST NOT BE CREATED).

so the server will fail :
---> MKD /incoming
<--- 550 System Error- /incoming: File exists.
(...Here the lftp hangs...I have to press CTRL+C...)
<--- 421 Timeout (3600 seconds): closing control connection.
**** Peer closed connection
---- Closing control socket



I suggest either:

a) the "mkdir -p" should create DIRECTORIES ONLY if they do not exist...

--or--

b) the "mirror" should support (if requested) the  "mget" or "get"
with all supported parameters in order to support the -O parameter

--or--

c) the mirror should incorporate directly the -O slot:a parameter

--or--

d) put an extra command "mirrorfxp" to support FXP between _slots_ of
ftp servers.





Thank you very much for your quick reply. I have searched all the
mailing list for FXP and directory and found that nobody has found a
solution to this problem.

As a temporarly fix I am trying to export everytime all the mirror
script to a file, edit it by hand and then execute it by "source
fxpscript" which is a very tedious process.

I hope that you will help us to find a solution to this problem and
keep lftp the best FXP console client.

Best Regards,

BigB3

Reply via email to