Autor Beitrag
Koelschman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 21



BeitragVerfasst: Fr 01.04.05 11:22 
Hi,
hat jemand schon mal mit dem Indy TFTP Client gearbeitet???

Möchte eine/mehrere Dateien auf einen TFTP Server schaufeln. Hat jemand ein Beispiel/Erklärung????

Grüße

Olli
demo88
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Ubuntu 6.04, Win XP
Delphi 7
BeitragVerfasst: Fr 01.04.05 11:34 
Such doch mal im Forum das gab es schon sehr oft (Ungefähr 40 mal :wink: )
Suche in: Delphi-Forum, Delphi-Library FTPCLIENT
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Fr 01.04.05 11:58 
das sind diese typischen 0815-Fragen, nach dem Motto:
Ich bin zu faul zu suchen, aber ihr könnts mir ja erklären!

find ich nicht so toll!
naja, hier mal ein tipp: bei dem indy-package sind beispiele, unter anderem auch ein ftpclient!

MfG, ScorpionKing!

_________________
Aus dem Urlaub zurück!
Koelschman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 21



BeitragVerfasst: Fr 01.04.05 12:21 
Titel: @ScorpionKing
Hi,
also bevor ich hier dumm angemacht werde....

Such doch mal nach TFTP....... na was findet man da ??? nicht wirklich viel, gell???

Vielleicht zur Info: TFTP <> FTP

Ich meine nicht den Indy FTP Client, sondern den Indy TFTP Client

Noch Fragen????
demo88
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Ubuntu 6.04, Win XP
Delphi 7
BeitragVerfasst: Fr 01.04.05 12:59 
In der Suche findest du ziemlich weit unten z.B. das:

www.delphi-forum.de/...;highlight=ftpclient

Da stehen ein paar nützliche Dinge drin.
Koelschman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 21



BeitragVerfasst: Fr 06.05.05 12:18 
Hi,
mit ein bisschen googlen habe ich die Lösung des Problems gefunden. Ich habe eine Demo der Clients und auch Server für TFTP gefunden:

Für Interessierte hier der Code für einen Filetransfer mit dem Client:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TfrmMain.btnUploadClick(Sender: TObject);
var
  s: string;
begin
  s := edtRemoteFile.Text;
  if s = '' then
    s := ExtractFileName(edtLocalFile.Text);
  with TrivialFTP do
  begin
    Host := edtHost.Text;
    Put(edtLocalFile.Text, s);
  end;
end;



Das selbe noch für ein Download über TFTP:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TfrmMain.btnDownloadClick(Sender: TObject);
var
  strm: TFileStream;
  s: string;
begin
  s := edtLocalFile.Text;
  if s = '' then
    s := ExtractFileName(edtRemoteFile.Text);
  strm := TFileStream.Create(s, fmCreate);
  with TrivialFTP do
  try
    Host := edtHost.Text;
    Get(edtRemoteFile.Text, strm);
  finally
    strm.Free;
  end;



Gruß
Kölschman

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.