C++Builder Developer on StackOverflow was having trouble with SysUtils FindFirst / FindNext not finding all files with extension ~1~ and other strange file extensions.
Create a New | C++Builder VCL Windows application. On the form add TPanel, TButton, TEdit and TMemo components. Put the TButton and TEdit into the TPanel. Set TPanel align property to AlTop. Set the TMemo align property to alClient.
The key point is to included any or all of the file attributes (integer parameter Attr) for files that you want to find. The file attribute choices are defined in “C:\Program Files (x86)\Embarcadero\Studio\21.0\include\windows\rtl\windows\rtl\System.SysUtils.hpp”:
Delphi/Pascal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
staticconstSystem::Int8 faInvalid=System::Int8(-1);// Identifies an invalid file.
staticconstSystem::Int8 faReadOnly=System::Int8(0x1);// Identifies read-only files or directories.
staticconstSystem::Int8 faHidden=System::Int8(0x2);// Identifies hidden files or directories.
staticconstSystem::Int8 faSysFile=System::Int8(0x4);// Identifies system files or directories.
I put the string: C:\Users\david\Documents\Embarcadero\Studio\Projects\CBuilder\FindFirstVCLCpp\__history\*.* in the EditBox. After clicking the Button, the TMemo contained the following contents.