// Remissive Delete Directory
BOOL CNAMEVIEW :: DeletedIRectory (char * dirname)
{
CfileFind TempFind;
Char TempFileFind [200];
Sprintf (TempFileFind, "% S //*.*", DIRNAME);
Bool isfinded = (bool) tempfind.FindFile (TempFileFind);
While (isfinded)
{
IsFinded = (BOOL) TempFind.FindNextFile ();
IF (! tempfind.isdots ())
{
Char FoundFileName [200];
STRCPY (FoundFileName, Tempfind.getFileName (). getBuffer (200));
IF (Tempfind.Indirectory ())
{
CHAR TEMPDIR [200];
Sprintf (Tempdir, "% S / /% S", DIRNAME, FOUNDFILENAME);
DELETEDIRECTORY (TEMPDIR);
}
Else
{
Char TempFileName [200];
Sprintf (TempFileName, "% S / /% S", DIRNAME, FOUNDFILENAME
Deletefile (TempFileName);
}
}
}
Tempfind.close ();
IF (! RemoveDirectory (DIRNAME))
{
AfxMessageBox ("Delete an error!");
Return False;
}
Return True;
}