try
Dir_List:=TStringList.Create;
IdFTP.ChangeDir('/');
IdFTP.List(Dir_List,'',False); //get all file name of current dir
if Dir_List.IndexOf('CUpload') = -1 //judge whether the file exist
then begin
SB.Panels[0].Text:='找不到更新文件';
exit;
end;
finally
Dir_List.Free;
end;