Board index » delphi » How to get listing of files in a directory using Delphi 3.0

How to get listing of files in a directory using Delphi 3.0

Hello,

I am looking for a technique to access a listing of files in a
particular directory using the standard Delphi components that come
with v3.0.  I am fairly new to Windows programming, but I have written
several apps that need to process all files in a particular directory.
What I have been doing to accomplish this task is to spawn COMMAND.COM
for a piped-DIRECTORY listing which I have another routine process to
get each filename.  I know there has to be an easier way, but I
haven't had any luck using any of the file window controls that come
with Delphi.

If anyone can shed any light on this subject, I would appreciate it
greatly.  Thanks!

        -Lee

 

Re:How to get listing of files in a directory using Delphi 3.0


Or using visual controls,
TFileListBox is a specialized list box that lists all the files in a
specified directory.
Add TFileListBox to a form to allow users to select a file. Use
TFileListBox along with TDriveComboBox, TFilterComboBox, and
TDirectoryListBox to add full file selection capabilities to a form.
The properties of these controls may be manipulated programmatically.

Other Threads