Hi, I have a suggestion.
I think you could handle resolve this by taking a different approach to the script. Use perl to loop thru the files one at a time, in the loop transfer the file, check thre return code, look for a returned error, then based on the return, do stuff, then start over on the next file. Bill On Wed, Jul 2, 2008 at 2:49 PM, Aethon <[EMAIL PROTECTED]> wrote: > Hi, > > I'm working with a relatively unique situation. Basically the FTP > server I'm connecting to has a peculiar authentication scheme where > prior to 'get'ing a file, you have to issue a site command with a file > specific password (this is on top of the normal login authentication > stuff). The reason this exists is because it isn't so much an FTP > server as an FTP interface to another system which has per file > passwords. In my specific situation the per file password is always > the same. > > What I'm doing is writing a Perl script that will write an LFTP script > that will download the files. To force this site command my LFTP > script looks similar to: > > open sitename > login user pass > site rpwd second_pwd > get file1 -o outdir/file1 > get file2 -o outdir/file2 > .... > get fileX -o outdir/fileX > exit > > This works fine except for when there is a connection error in the > middle. LFTP then attempts to reconnect and continue at the file it > left off. However since it is a new connection, the site command is > never issued prior to the file retrieval and therefore the transfer > fails for that file and the rest of the files in the script. > > Is there some way I can force LFTP to issue this site command prior to > attempting to retrieve the file after reconnecting? > > Thanks, > > Aethon >
