FindFile()1 [C] 디렉토리(폴더)의 모든 파일을 제거 디렉토리(폴더)내의 모든 파일을 제거, 삭제하는 함수 DeleteAllFile 입니다. 파일을 삭제하는 함수이므로 주의해서 사용하시기 바랍니다. 핵심 코드는 CFileFind, FindFile, DeleteFile 입니다. void DeleteAllFile( LPCSTR szDir ) { CString strName; strName.Format( "%s\\*.*", szDir ); CFileFind ff; BOOL bFind = ff.FindFile( strName ); while( bFind ) { bFind = ff.FindNextFile(); if( ff.IsDots() == TRUE || ff.IsDirectory() == TRUE ) continue; DeleteFile( ff.GetFilePa.. 2012. 12. 26. 이전 1 다음