文件拷贝 资源收集
来源:互联网 发布:网络剧发行新方法 编辑:程序博客网 时间:2024/05/16 11:57
文件拷贝
http://www.codeproject.com/Articles/6570/Copy-Move-and-Delete-files-and-directories-without
http://download.csdn.net/detail/career2011/3657624
SHCreateDirectoryEx(NULL,"E:\\Fun\\新建文件夹",NULL); WIN32_FIND_DATA FindFileData; HANDLE hFile = NULL; stack<string> stkFilePath; stkFilePath.push(m_strInput); while (!stkFilePath.empty()) { string filePath = stkFilePath.top(); stkFilePath.pop(); if (filePath.rfind('\\') != 0) { filePath.append("\\"); } filePath.append("*.*"); hFile = ::FindFirstFile(filePath.c_str(),&FindFileData); if (INVALID_HANDLE_VALUE == hFile) { continue; } do { if ( (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && !((FindFileData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) || (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))) { if (0 == strcmp(FindFileData.cFileName, ".") || 0 == strcmp(FindFileData.cFileName, "..")) { continue; } filePath = filePath.assign(filePath,0,filePath.rfind('\\')); filePath = filePath + "\\" + FindFileData.cFileName; string currPath = filePath.substr(m_strInput.length()); stkFilePath.push(filePath); string strDst = m_strOutPut; strDst.append(currPath); if (!CreateDirectory(strDst.c_str(),NULL) && GetLastError() != 183) { continue; } } else { filePath = filePath.assign(filePath,0,filePath.rfind('\\')); filePath = filePath + "\\" + FindFileData.cFileName; } } while (FindNextFile(hFile, &FindFileData)); }
0 0
- 文件拷贝 资源收集
- maven 拷贝资源文件
- 从资源里拷贝文件
- 收集资源文件下载地址
- 资源对话框拷贝 类文件关联
- 资源文件拷贝的三种方式
- ios把资源文件数据库拷贝到沙盒中
- 从jar中拷贝资源文件
- 拷贝asserts资源目录下的文件
- 对.NET资源文件的资料收集
- 收集资源
- 资源收集
- 资源收集
- 资源收集
- 资源收集
- 资源收集
- 资源收集
- 资源收集
- mvc跟设计模式
- C#获取指定网页源码的几种方法
- BWAI星际争霸与AI开发
- C#委托的介绍(delegate、Action、Func、predicate)
- 关于main函数中argc和argv的简单介绍
- 文件拷贝 资源收集
- #2001 delete[] applied to memory allocated by _tcsdup() (zz)
- BuildAssetBundle with .FBX
- Data source rejected establishment of connection, message from server: "Too many connections"
- oracle 绑定变量(bind variable)(1)
- OOP Interview Questions
- oracle 绑定变量 bind variable(2)
- Brad Frost:TechCrunch响应式设计之路
- 指令系统*微代码