SHFileOperation

  SHFILEOPSTRUCT FileOp;
  ZeroMemory((void*)&FileOp,sizeof(SHFILEOPSTRUCT));
   
    FileOp.fFlags = FOF_SIMPLEPROGRESS   |   FOF_NOCONFIRMATION   |   FOF_NOCONFIRMMKDIR ;
     FileOp.hNameMappings = NULL;
      FileOp.hwnd = NULL;
      FileOp.lpszProgressTitle = NULL;
  FileOp.pFrom = _T("C:\\NTDETECT.COM\0C:\\bootfont.bin");//strFileName.GetBuffer();
  FileOp.pTo = _T("D:\\tmp\0");
      FileOp.wFunc = FO_COPY;
   
      if(SHFileOperation(&FileOp) == 0)
  {
   MessageBox(_T("拷贝成功!"));
  }

你可能感兴趣的:(SHFileOperation)