Examples: Grouped File Operations

 

New article Grouped File Operations has been published:

It is sometimes necessary to perform identical operations with a group of files. If you have a list of files included into a group, then it is no problem. However, if you need to make this list yourself, then a question arises: "How can I do this?" The article proposes doing this using functions FindFirstFile() and FindNextFile() included in kernel32.dll.

It is not a problem to read or write one file. Even if you use WinAPI for this, as described in article File Operations via WinAPI. But what should we do if we don't know the exact name of the file, only its location in a certain folder and its extension? Of course, we can enter the necessary name manually, as a parameter, but what should we do if there are ten or more such files? We need a method of grouped processing the files of the same type in the given folder. This task can be efficiently solved using functions FindFirstFile(), FindNextFile() and FindClose() included in kernel32.dll.

Author: MetaQuotes Software Corp.

Reason: