procedure UpLoadFiles(CurrentDir:string;FtpDir: String;ftpsvr:Tidftp);<br>var<br> i:integer;<br> strname:string;<br> sr:TSearchRec;<br>begin<br> chdir(CurrentDir);<br> if findfirst('*',faArchive,sr)=0 then<br> begin<br> repeat<br> try<br> ftpsvr.Put(sr.Name,sr.Name);<br> except<br> end;<br> until findnext(sr)<>0;<br> end;<br> FindClose(sr);<br>end;