Click to See Complete Forum and Search --> : File/Folder Copying


Johan D'Hondt
May 7th, 1999, 09:21 AM
Hello everybody,

The goal of my program is to make a back-up utility which will copy some files to a temporary folder, zip them and delete the folder again. However, there two categories of files: a few fixed configurationfiles and a lot of data files. These datafiles can are stored in folders (with possibly some subfolders). The first category I can copy with the CopyFile command without any problems. This command wasn't possible to use for the second category because I can't use wildcards with this command.
So, I tried with the CopyFolder-command but this didn't work. When I look at it in the help, I see that it's related to IMAPISupport. Do I have to include an additional header or so before I can use this function?
I am using VC4.2.
At the end I will include my code and the recieved errors.

Thanks in advance,
Johan

if (m_bCmp == TRUE)
{
char *lpSrc = "c:\\cmp\\";
char *lpDest = "c:\\windows\\temp\\backup\\cmp\\";
char *lpDestDir ="c:\\windows\\temp\\backup\\cmp\\";
CreateDirectory(lpDestDir, NULL);
CopyFolder(0, lpSrc, 0, 0, NULL, lpDest, NULL, NULL, NULL, COPY_SUBFOLDERS);
}

ERRORS:
C:\Backup\BackupDlg.cpp(290) : error C2065: 'CopyFolder' : undeclared identifier
C:\Backup\BackupDlg.cpp(290) : error C2065: 'COPY_SUBFOLDERS' : undeclared identifier
C:\Backup\BackupDlg.cpp(290) : error C2064: term does not evaluate to a function

indika
May 7th, 1999, 09:50 AM
Try include the .h file I forget the name of the file. do help to findout the include file.