Breaking News
recent

Delphi navigate to windows folders and subfolders to search files


This is a very smart source code to navigate to windows folders, starting from a root folder that you declare.


Navigate(GetCurrentDir);

procedure Navigate(Folder: String);
var
  SearchRec: TSearchRec;
begin
  FindFirst(Folder + '\*.*', faDirectory, SearchRec);
  repeat
    if (SearchRec.Attr=16) and (SearchRec.Name<>'.') and (SearchRec.Name<>'..') then
      Navigate(Folder+'\'+SearchRec.Name);
  until  FindNext(SearchRec)<> 0;
  FindClose(SearchRec);
end;



Προμηθέας

Προμηθέας

No comments:

Post a Comment

Please leave you comment to improve our services and support

Powered by Blogger.