I recently started with delphi, and now I want to get all mp3 files from the directory. I want something like glob () php function.
Old way to do this: approx:
var status : dword; sr : TSearchRec; begin status := FindFirst('*.mp3',faAnyFile,sr); while status = 0 do begin // sr.Name is the filename; add it to a list // or something. Note there is no path so you // may need to add that back on somewhere status := FindNext(sr); end; SysUtils.FindClose(sr); // ... end;
Try IOUtils.TDirectory.
, .
\JclFileUtils :
function BuildFileList(const Path: string; const Attr: Integer; const List: TStrings; IncludeDirectoryName: Boolean = False): Boolean;
JCL IDE. JCL ( ) http://sourceforge.net/projects/jcl/
TFileListBox Delphi FileCtrl .
, Delphi 1 About Delphi , .
, Visible = False .
Visible = False
(, ), *.mp3.
-
- TFindFile Delphi Area: http://www.delphiarea.com/products/delphi-components/findfile/
/,
Source: https://habr.com/ru/post/1776081/More articles:ContextMenuService in Silverlight 4 - silverlightLaTeX - Classifieds - Code Indention - latexHow to determine if a port is used in C on Linux? - cteamwork methodology - designHow to create a mapping file for an ordered list with Hibernate? - javaproblem with jquery sorting and pointers - jqueryHow to create scripts for publishing and publishing after publishing in VS2010 - c #The lower-level global mouse hook freezes when the header buttons are clicked - c ++How to find the peak in the array? - arraysJLayeredPane: what is the functional difference between depth and position? - javaAll Articles