Board index » delphi » List files in a directory

List files in a directory

        How can I obtain a list of files in a chosen directory?  It would be
best if I could also specify only files with a designated extension.
 

Re:List files in a directory


1. In code: FindFirst & FindNext
2. On-screen: tOpenDialog
Quote
vacerose wrote in message <7a9ucc$31...@news.fsu.edu>...
> How can I obtain a list of files in a chosen directory?  It would be
>best if I could also specify only files with a designated extension.

Re:List files in a directory


Check the functions Findfirst; FindNext and FindClose.

In the findfirst you specify the directory and the mask of the files.

Ben

Re:List files in a directory


Quote
>   "Ben Vicca" <vic...@Logica.com> writes:
>  Check the functions Findfirst; FindNext and FindClose.
>  In the findfirst you specify the directory and the mask of the files.

You can also use a filelistbox.
I do that from time to time when I have a program that need to check a specific folder and work on the files coming there.

johan

Other Threads