CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    2

    File/Folder Copying

    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





  2. #2
    Join Date
    May 1999
    Posts
    30

    Re: File/Folder Copying

    Try include the .h file I forget the name of the file. do help to findout the include file.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured