esta funcion esta programada con apuro pero te puede servir de algo
llena un arbol con el ftp, lo puedes adaptar a en lugar de llenar el arbol debes hacer un get recursivo, para subir al ftp es put y get para bajar
Código Delphi
[-]
procedure TForm1.LlenaArbolDirectorioFTP(NodoA:TTreeNode;r:string);
var i,j:integer; Nodo,Nodo1:TTreeNode; n:string; t,t1:tstrings;
begin
Nodo := TTreeNode.Create(nil); t:=tstringlist.Create ;
t1:=tstringlist.Create ;
with idftp1 do
begin
if connected then
begin
ExtListDir (t,r);
ChangeDir(r);
for I := 0 to DirectoryListing.Count - 1 do
begin
if DirectoryListing.Items[i].ItemType = ditDirectory then
begin
n:= DirectoryListing.Items[i].FileName;
nodo := ArbolFTP.Items.AddChild(NodoA,n);
nodo.ImageIndex := 0;nodo.SelectedIndex := 0;nodo.StateIndex := 2;
end;
if DirectoryListing.Items[i].ItemType = ditFile then
begin
nodo := ArbolFTP.Items.AddChild(NodoA,DirectoryListing.Items[i].FileName );
nodo.ImageIndex := 3; nodo.SelectedIndex := 3;nodo.StateIndex := 2;
end; end; end; end; t.Free;
t1.free;
end;