VC实现文件的拷贝移动
2010-05-28 15:42
330 查看
BOOL CopyFile( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists);lpExistingFileName [in] Pointer to a null-terminated string that specifies the name of an existing file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "//?/" to the path. For more information, see Naming a File.
Windows Me/98/95: This string must not exceed MAX_PATH characters.lpNewFileName [in] Pointer to a null-terminated string that specifies the name of the new file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "//?/" to the path. For more information, see Naming a File.
Windows Me/98/95: This string must not exceed MAX_PATH characters.bFailIfExists [in] If this parameter is TRUE and the new file specified by lpNewFileName already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
该函数可以显示文件以及文件夹的整体拷贝和移动,例子如下:
CopyFile(_T("E://01.bmp"),_T("F://01.bmp"),FALSE );
把E盘的拷贝并移动到F盘
相关文章推荐
- java 实现 文件操作工具集。包括文件、目录树的拷贝、删除、移动、查找等工具函数
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- VC/MFC(C++)实现文件拷贝和文件删除等
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- SHFileOperation()的外壳函数,用它可以实现各种文件操作,如文件的拷贝、删除、移动等
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- VC/MFC(C++)实现文件拷贝和文件删除等
- VC/MFC(C++)实现文件拷贝和文件删除等
- java实现FTP远程文件移动(重命名、复制、拷贝)
- Linux(CentOS)挂载移动硬盘,实现文件拷贝、备份
- shellapi的SHFileOperation()的外壳函数,用它可以实现各种文件操作,如文件的拷贝、删除、移动等
- vc删除、拷贝、移动文件夹及其文件
- 转: VC实现指定文件拷贝到U盘的代码
- VC下利用多线程实现文件的快速检索
- VC 实现文件与应用程序关联
- Java实现文件拷贝的4种方法(转)
- Autohotkey实现类似total commander拷贝文件路径的快捷键
- C# 文件操作(全部) 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名