close

 

    // create dir (if dir doesn't exist)
    // dst是full path
    for ( int i = 3, cur = 3; i < dst.GetLength(); i++ ) { // 3是因為有"C:\",把C槽本身當作一個資料夾
        if ( dst.GetAt(i) == L'\\' ) {
            if (!CFile::GetStatus(dst.Left(i), filestatus) ) // 判斷當前路徑如果不存在
                if ( !CreateDirectory(dst.Left(i), NULL) ) // 如果建立資料夾失敗
                    MessageBox(NULL,L"create dir fail!",L"ppppppppp",MB_OK);
        } // end if
    } 
arrow
arrow
    文章標籤
    c c++ MFC 建立資料夾
    全站熱搜

    跪著讀 發表在 痞客邦 留言(0) 人氣()