Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: Transferring directories having 0..n sub-dirs using idFTP

www.cryer.info
Managed Newsgroup Archive

Re: Transferring directories having 0..n sub-dirs using idFTP

Subject:Re: Transferring directories having 0..n sub-dirs using idFTP
Posted by:"H. Hoffmann" (no.ma..@return.com)
Date:Fri, 28 Apr 2006 06:49:01

Remy Lebeau (TeamB) schrieb:
> "H. Hoffmann" <no.mail@return.com> wrote in message
> news:44511437@newsgroups.borland.com...
>
>
>>i need a "good idea" for a let's call it how-to or smart way to transfer
>>complete directories that also may have a number of 0 to n sub-dirs
>>using idFTP. I'm using D2006pro and Indy 9.
>
>
> There is nothing in the FTP protocol to do that directly.  The only way to
> do it is to call MakeDir(), ChangeDir(), and Put() in a recursive loop to
> upload all of the files individually.  You have to upload all of the files
> for a given folder, then loop through its imediately sub folders creating
> them on the server as needed, then change to them one at a time, repeating
> as needed.
>
>
>>The question is how to do in a "good" or call it smart way to
>>avoid running in recursive traps while iterating through the selected
>>directories down to the very last sub-dir of the selected dir on top.
>
>
> What trap are you referring to exactly?
>
>
> Gambit
>
>

Thank you for your reply.

With trap i'm referring to the possibility/chance, to build up a
solution that "recurssivly calls itself" on iterating through the Dirs
(scanning recursivly for the contents of a certain dir, process
contents, finding again a dir -> scanning that for files/dirs and so on
and on and on).
It shoul be something like FindFirst and FindNext that can be used on a
FTP-Host without recursive implementation.
I do not know how to explain it in details without writing a lot of text
but i hope it makes clear where in see that possibility for generating a
"Recursive trap".
If you have an other solution for that issue, would be nice if you could
let me know.

Thank's

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive