idFTPÅжÏÎļþ¼ÐÊÇ·ñ´æÔÚ2009-09-1112:03TIdFtpÔª¼þ›]ÓÐDirectoryExists¼°FileExistsº¯Ê½1.ÅДàDirectory(ÒªÏÈßBÉÏFtpServer)functionFtpDirectoryExists(ADir:string):Boolean;beginResult:=True;tryIdFtp1.ChangeDir(ADir);exceptResult:=False;end;end;2.ÅДàFilefunctionFtpFileExists(AFile:string):Boolean;varsl:TStringList;beginResult:=False;sl:=TStringList.Create;tryIdFtp1.Connect;IdFtp1.ChangeDir('some_dir');IdFtp1.List(sl.Strings,'',False);ifPos(AFile,sl.Text)0thenResult:=True;IdFtp1.Disconnect;finallysl.Free;end;end;