Copy folders along with subfolders in C++
-
Hi, I want to copy a folder along with it's subdirectories to another location using C++.I tried using SHFileOperation but it fails saying "Cannot copy file.Filename is too long".My folder name is just 8 characters long.Is there any better way to copy folders? Please help.... Thanks, Dipeka Dipeka.A.J
-
Hi, I want to copy a folder along with it's subdirectories to another location using C++.I tried using SHFileOperation but it fails saying "Cannot copy file.Filename is too long".My folder name is just 8 characters long.Is there any better way to copy folders? Please help.... Thanks, Dipeka Dipeka.A.J
int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp );
-
int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp );
-
Thank u zhang.I'm using SHFileoperation but it says "Cannot copy file.Filename is too long". My folder name is only 8 characters.What could be the problem? Thanks, Dipeka Dipeka.A.J
SHFILEOPSTRUCT FileOp; FileOp.hwnd=m_hWnd; //设置句柄 //设置操作方式,拷贝用FO_COPY,删除用 FO_DELETE FileOp.wFunc=FO_COPY; FileOp.pFrom="E:\\11"; //源文件路径 FileOp.pTo="E:\\22"; //目标文件路径 FileOp.fFlags=FOF_ALLOWUNDO; //允许恢复 FileOp.hNameMappings=NULL; FileOp.lpszProgressTitle="copy"; //设置标题 SHFileOperation(&FileOp); //执行外壳拷贝
-
Hi, I want to copy a folder along with it's subdirectories to another location using C++.I tried using SHFileOperation but it fails saying "Cannot copy file.Filename is too long".My folder name is just 8 characters long.Is there any better way to copy folders? Please help.... Thanks, Dipeka Dipeka.A.J
hi if u dont want to use SHFileOperation. U can use CFileFind & CopyFile() Jetli Constant Thing In World Is Change.
-
Thank u zhang.I'm using SHFileoperation but it says "Cannot copy file.Filename is too long". My folder name is only 8 characters.What could be the problem? Thanks, Dipeka Dipeka.A.J
pFrom and pTo should be double NULL terminated. http://blog.joycode.com/jiangsheng http://blog.csdn.net/jiangsheng Command what is yours Conquer what is not ---Kane