|
From: Per W. <pw...@ia...> - 2003-07-11 20:52:03
|
I have deleted the original question and Adam's answer, so I can't check the full-text messages. However, where in Adam's response did you see any "heavy" sarcasms? The citated part does mention FindFirst/FindNext/... and the very valid remark that FindClose() must be used. It is a very, very common mistake to forget the FindClose(), since since the program would leak handles and memory resources without the call - resulting in future failures if the directory scan is performed multiple times without restart of the application. /Per W On Fri, 11 Jul 2003, [ISO-8859-2] OROSZI Bal=E1zs wrote: > Adam Malinowski wrote: > >>I am new to C++. I like to read files name in the folder . For an examp= le, > >>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. > > Don't you think this was a bit "strong" or "heavy" for sarcasm? > > -- > Greetings, > Bal=E1zs > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Parasoft > Error proof Web apps, automate testing & more. > Download & eval WebKing and get a free book. > www.parasoft.com/bulletproofapps1 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |