BOOL find_box;
CString delbox;
  
for (int i = 0; i < folderNum; i++)
{
    delbox.Format(_T("%s\\*.box"), folderNumPath[i]);
    find_box = finder.FindFile(delbox);
    if (!find_box)
    {
        finder.Close();
        return;
    }
    while (find_box)
    {
        find_box = finder.FindNextFile();
        CString fname = finder.GetFileName();
        CString deletebox;
        deletebox.Format(_T("%s\\%s"), folderNumPath[i], fname);
        ::DeleteFile(deletebox);
    }
}

+ Recent posts