IdFTP
			 
			 
			
		
		
		
		В общем с толкнулся с такой проблемой, необходимо приконнектиться к фтп серверу и просто подсчитать количество содержащихся в указанной дирректории файлов исключая подпапки и вложенные в них файлы. С конектом разобрался, а вот подсчитать немогу. Вывыливается с ошибкой 
 
class EListError with message 'List index out of bounds (0)' 
 
var 
  i,count:integer; 
begin 
 count :=0; 
 DirectoryListBox.ItemIndex := 0; 
 for i:=1 to DirectoryListBox.Count 
 do begin 
      if IdFTP1.DirectoryListing.Items[DirectoryListBox.ItemIndex].ItemType=ditDirectory 
      then count := count else count:= count + 1; 
      DirectoryListBox.ItemIndex := DirectoryListBox.ItemIndex + 1; 
    end; 
 ShowMessage(IntToStr(Count)); 
end; 
		
	
		
		
		
		
		
	
		
		
	
	
	 |