var recSearch : TSearchRec; sUNC : string; ... begin { get unc path to base directory } sUnc := DB.QSetup_Globalupdate_unc.AsString; { enumerate only directories } i := FindFirst( sUNC + '*.*' , faDirectory, recSearch ); while i = 0 do begin if recSearch.name[1] <> '.' then begin try { do something; } except end; end; { try find next } i := FindNext( recSearch ); end; FindClose( recSearch ); ... end;
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Friday, December 8, 2017
DELPHI - How enumerate all directories
Use faDirectory setting in FindFirst():
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment