![]() |
Liste aller Dateien in Unter/Verzeichnissen auf FTP
Ich brauche eine Möglichkeit alle Dateien auf einem FTP Server mit Absoluter Adresse in eine List Box zu bekommen.
Ich hatte mir schon so ein Par dinge überlegt aber so wirklich auf die Richtige Idee gekommen bin ich noch nicht. Hier mein Code-„Abfall“
Delphi-Quellcode:
Die ersten par Daten werden ja richtig Heruntergeladen aber der in dem neuen Ordner nicht, ist mir auch klar ich hab bloß keine Lösung. :wall:
procedure TForm1.Button4Click(Sender: TObject);
var slist: TStrings; anzahl, sl: integer; dir: string; begin SList := TStringList.Create; IdFTP1.List(slist,'*',false); form1.ListBox1.Items:= slist; anzahl:= form1.ListBox1.Items.Count; for sl:= 0 to anzahl-1 do if pos('.',form1.listbox1.Items[sl])>0 then begin Present:= Now; DecodeDate(Present, Year, Month, Day); DecodeTime(Present, Hour, Min, Sec, MSec); dos('['+ inttostr(hour) +':'+ inttostr(min) +':'+ inttostr(sec) +'] Starte Downlord von "'+ form1.listbox1.Items[sl] +'"!', 1); log.WriteString(inttostr(day)+'.'+inttostr(month)+'.'+inttostr(Year), inttostr(hour) +':'+ inttostr(min) +':'+ inttostr(sec), 'Starte Downlord von "'+ form1.listbox1.Items[sl] +'"!'); form1.IdFTP1.Get(form1.listbox1.Items[sl], 'bak\'+form1.listbox1.Items[sl], true); end else begin dir:= dir + form1.listbox1.Items[sl]; form1.IdFTP1.ChangeDir(form1.listbox1.Items[sl]); if pos('.',form1.listbox1.Items[sl])>0 then begin Present:= Now; DecodeDate(Present, Year, Month, Day); DecodeTime(Present, Hour, Min, Sec, MSec); dos('['+ inttostr(hour) +':'+ inttostr(min) +':'+ inttostr(sec) +'] Starte Downlord von "'+ form1.listbox1.Items[sl] +'"!', 1); log.WriteString(inttostr(day)+'.'+inttostr(month)+'.'+inttostr(Year), inttostr(hour) +':'+ inttostr(min) +':'+ inttostr(sec), 'Starte Downlord von "'+ form1.listbox1.Items[sl] +'"!'); if not DirectoryExists('bak\'+dir+'\'+form1.listbox1.Items[sl]) then mkdir('bak\'+dir+'\'+form1.listbox1.Items[sl]); form1.IdFTP1.Get(form1.listbox1.Items[sl], 'bak\'+dir+form1.listbox1.Items[sl], true); end; end; end; Aber vergessen wir dass. Es ist sowie so nicht das was Ich suche. Ich suche eine Möglichkeit alle Daten auf einem FTP-Server mit Pfad in eine ListBox zu schreiben. Das einzige was ich Heute noch Suche ist mein Bett, Ich sitze schon den ganzen Tag an dem Problem und bin schon so gaga das ich nur noch Buchstaben verdrehe :drunken: und für diesen Text in Word 50min gebraucht habe. Also liebe Nachtacktive, Ich setze auf euch. :mrgreen: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:34 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz