2010년 1월 27일 수요일

파일 경로에서 파일명만 파싱하기


참고 : http://kurapa.com/content-a13342
참고2 : http://purelab.net/zbxe/1918


CString strPath; // 전체경로가 저장되어있는 변수명
CString strFileName; // 폴더위치를 저장할 변수명

int nPos = strPath.GetLength() - strPath.ReverseFind('\\') - 1;   
strFileName= strPath.Right (  nPos  );

댓글 없음:

댓글 쓰기