Autor Beitrag
Pyr0cracker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: So 16.03.03 15:40 
hi, wie kann ich eine datei mit ftp hochladen?
mit den indy's geht das ja mit idftp aber kann mir jemand eine kleine anleitung dafür geben?
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 16.03.03 15:58 
Du hast also deine idFTP Komponente auf dem Formular plaziert und hast ihr auch schon irgendwann die ganzen benötigten Informationen gegeben. Servername, Username, Passwort, usw.
Dann benutzt du idFTP.Put(Dateiname, Zielname, true);
damit kannst du die Datei Dateiname mit allen Angaben auf den FTP hochladen. Zielname gibt den Namen der Datei auf dem Server mit Verzeichnis an. true bedeutet, dass bestehende Dateien überschrieben werden.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Pyr0cracker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 164

Win XP, Ubuntu 8.04, openSUSE 11.0
Delphi 7 Personal
BeitragVerfasst: So 16.03.03 16:14 
ja, aber ich kann ja noch nicht mal eine verbindung aufbauen.

kannst du mir nicht erklären wie ich verbinde, name und passw schicke, verzeichniss wechsle und dann hochlade?

das wäre nett.
danke schon mal,
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 16.03.03 17:08 
So kannst du das zum Beispiel machen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Button1Click(Sender: TObject);
begin
 idFTP1.Host := 'rechner.server.top-level-domain';
 idFTP1.User := 'suchdirwasaus';
 idFTP1.Password := 'istdochegal';
 try
   idFTP1.Connect(true);
   idFTP1.ChangeDir('texts');
   idFTP1.Put('c:\programme\egal.txt', 'egal.txt', true);
 except
   idFTP1.Disconnect;
end;


Damit kannst du die Datei egal.txt in das Verzeichnis texts auf dem FTP hochladen.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Sy-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Mi 02.07.03 12:13 
bei mir kommt immer der fehler
.... EIdProtocolReplyError aufgetreten .... :Append/Restart not premitted, try again :roll:
Sy-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Fr 04.07.03 10:42 
liegt es am netzwerk/proxy wenn ja was kann ich da machen?
oder was habe ich falsch gemach?

antwortet mal :/
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 04.07.03 12:12 
Poste halt mal Deinen Code und sag genau, an welcher Stelle dieser Fehler auftritt.
Sy-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Fr 04.07.03 13:01 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
try 
   idFTP1.Connect(true); 
   idFTP1.ChangeDir('***'); 
   idFTP1.Put('c:\****', '***', true); 
except 
   idFTP1.Disconnect; 
end;


bei idFTP1.Put('c:\****', '***', true);