Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: Transferring directories having 0..n sub-dirs using idFTP
| Subject: | Re: Transferring directories having 0..n sub-dirs using idFTP |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Thu, 27 Apr 2006 13:50:58 |
"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