so hier jetzt mal mein quellcode über denn ich die Dateinamen herausfinde...
Delphi-Quellcode:
//******************************************************************************
// Show Files from FTP Directory *
//******************************************************************************
procedure TMain_Form.btn_shwfilesClick(Sender: TObject);
var
blEntrys : Boolean;
i : Integer;
sFileName :
String;
slFiles : TStringList;
begin
blEntrys := True;
If edt_directory.Text = '
'
Then
Begin
MessageDlg('
Some Entrys are Missing!', mtWarning, [mbOk], 0);
blEntrys := False;
End;
If blEntrys = True
Then
Begin
FTP.ChangeDir(edt_directory.Text);
End;
slFiles := TStringList.Create;
FTP.List(slFiles, '
*', True);
For i := 0
To slFiles.Count - 1
Do
Begin
sFileName := fnConvertFileNameFTP(slFiles.Strings[i]);
mem_files.Lines.Add(sFileName);
End;
end;
//******************************************************************************
// Convert File Name *
//******************************************************************************
function TMain_Form.fnConvertFileNameFTP(FTPListLine :
String) :
String;
var
i, iLen, iPos : Integer;
begin
iLen := Length(FTPListLine);
For i := iLen - 1
DownTo 0
Do
Begin
If FTPListLine[i] = #32
Then
Begin
iPos := i + 1;
Break;
End;
End;
fnConvertFileNameFTP := Copy(FTPListLine, iPos, ((iLen - iPos) + 1));
end;
hmm ich weiß nicht welche indys ich verwende... wie find ich das denn raus?