#include "Shlwapi.h"
 #pragma comment(lib,"shlwapi.lib")//vc6.0中需要添加此句
 if(PathFileExists(str))
 {
  CString strTemp;
  strTemp.Format("%s已存在!",str);
  AfxMessageBox(strTemp);
  return ;
 }