It is necessary to delete files, including files "Read Only." If the properties are ticked "Read Only", then remove () cannot be removed. I tried to get information about the file in the _finddata_t structure and change the attrib field in it,
char[50] path; // Путь к файлу и маска поиска _finddata_t file; _findfirst(path, &file); file.attrib = _A_NORMAL;// Попытка сделать файл без запретов на чтение или запись but also nothing. The file is still not deleted and the check mark is not removed. Although if you uncheck the box manually (right-click on file-> properties), it is only then deleted.