• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 刪除非空目錄

    發表于:2007-07-14來源:作者:點擊數: 標簽:
    #include stdafx.h bool DeleteDirectory(char* DirName) { CFileFind tempFind; char tempFileFind[200] ; sprintf(tempFileFind,%s\*.*,DirName); BOOL IsFinded = tempFind.FindFile(tempFileFind); while (IsFinded) { IsFinded = tempFind.FindNextFile
    #include "stdafx.h"

    bool DeleteDirectory(char* DirName)

    {
    CFileFind tempFind;
    char tempFileFind[200] ;

    sprintf(tempFileFind,"%s\*.*",DirName);
    BOOL IsFinded = tempFind.FindFile(tempFileFind);
    while (IsFinded)
    {

    IsFinded = tempFind.FindNextFile();

    if (!tempFind.IsDots())
    {
    char foundFileName[200];
    strcpy(foundFileName,tempFind.GetFileName().GetBuffer(200));

    if (tempFind.IsDirectory())
    {
    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))
    {
    MessageBox(0,"é?3yê§°ü","ê§°ü",MB_OK);
    return FALSE;
    }

    return TRUE;

    }

    void main()
    {
    DeleteDirectory("d:\222");
    }

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>