CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Finding files in a folder / directory using MFC!

There are a couple of ways to find/search files in a folder/directory. Usually, Win32 programmers use FindFirstFile & FindNextFile functions to find the files in a particular folder. MFC provides a simplified way of finding the files using CFileFind class.

The following example shows how to find files in a particular folder. This example is also helpful to find files recursively:

You can call the above function anywhere in your program. For example, the following function call shows all the files in C: drive recursively:

FileFind(_T("C:\\*.*"));

Finding files in a folder / directory using MFC!

One thought on “Finding files in a folder / directory using MFC!

  1. Pingback: Homepage

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top