|
From: Adam M. <up...@in...> - 2003-07-10 21:56:24
|
> Hello, > > I am new to C++. I like to read files name in the folder . For an example, > My path is "C:\temp\data ", and in the folder there are some files that i > need to read only file name like file1.dat , file2.dat , file3.dat .... all > my dat file. If anyone have any advice or good idea how to write this > function for me I will be very happy. Thank you very much > Try FindFirst and FindNext or FindFirstFile and FindNextFile. You can specify diiferent parameters and file extension is one of them. FindFirst and aFindNext belongs to VCL library. FindFirstFile and FindNextFile are Win32 API functions. Remember to use FindClose. |