Einzelnen Beitrag anzeigen

mr2

Registriert seit: 3. Mai 2003
140 Beiträge
 
Delphi 2006 Enterprise
 
#4

Re: upload local auf einem server

  Alt 17. Nov 2003, 15:26
Hallo,

ändere einfach den Beispielaufruf aus meinem ersten Posting wie folgt ab:
Delphi-Quellcode:
var
  Files, Errors: TStringList;
  i: Integer;
begin
  Errors := nil;
  Files := TStringList.Create;
  try
    Errors := TStringList.Create;
    ReadFileNames(Files, 'C:\Daten\', soNone, '*.*', True, False);
    IdFTP.Host := 'ftp.heise.de';
    IdFTP.User := 'Knut';
    IdFTP.Password := 'geheim';
    IdFTP.Connect;
    for i:=0 to Pred(Files.Count) do
      try
        IdFTP.Put(Files[i], ExtractFileName(Files[i]));
      except
        Errors.Add(Files[i]);
      end;
    for i:=0 to Pred(Errors.Count) do
      try
        IdFTP.Put(Errors[i], ExtractFileName(Errors[i]));
      except
        on E: Exception do Application.HandleException(E);
      end;
  finally
    FreeAndNil(Files);
    FreeAndNil(Errors);
    IdFTP.Disconnect;
  end;
end;
"... we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we don't know. But there are also unknown unknowns - the ones we don't know we don't know."
  Mit Zitat antworten Zitat