Welcome to the Xceed Community | Help
Community Search  
More Search Options

Error 323

Sort Posts: Previous Next
  •  08-18-2008, 9:46 AM Post no. 14127

    Error 323

    Hi,

    I am getting an error 323 (The filemask or file entry did not match any existing file) in the Xceed Zip Compression Library when I try to add a folder via AddFilesToProcess().  The obvious problem would be that I am forgetting the trailing backslash, but I am not.  I have verified this in the debugger.  Individual files are added without any problem, but it chokes on folders.

    Can anyone offer any suggestions as to what I am doing wrong?  My app is running on a Windows Vista machine, and is written in VC++ 6.0.  Here is the relevant code:

       IXceedZipPtr piXceedZip(CLSID_XceedZip);
       piXceedZip->License(myLicense);
       CXceedZipEventSink sink;
       sink.DispEventAdvise(piXceedZip);
       sink.SetXceedZip(piXceedZip);

       piXceedZip->ZipFilename = _bstr_t(LPCTSTR(m_strFilePNE));
       piXceedZip->PreservePaths = false;
       piXceedZip->ProcessSubfolders = true;
       POSITION pos = m_listFileNames.GetHeadPosition();
       while ( pos != NULL )
       {
        CString fileNamePNE = m_listFileNames.GetNext(pos);
        piXceedZip->AddFilesToProcess(_bstr_t(LPCTSTR(fileNamePNE)));
       }

       pos = m_listFolderNames.GetHeadPosition();
       while ( pos != NULL )
       {
        CString folderNamePath = m_listFolderNames.GetNext(pos);
        folderNamePath += "\\";
        piXceedZip->AddFilesToProcess(_bstr_t(LPCTSTR(folderNamePath)));
       }

       // Create the new ZIP file
       long xErr = piXceedZip->Zip();

    Thanks!

    JAB

     

  •  08-19-2008, 2:53 PM Post no. 14216 in reply to 14127

    Re: Error 323

    You need to add the * wildcard to the file mask in order to zip all files in your folder.

    e.g.:

    foderNamePath += "\\*";


    André
    Software Developer
    Xceed Software Inc.
  •  08-19-2008, 3:28 PM Post no. 14219 in reply to 14216

    Re: Error 323

    Thanks.  I already did that, and it works fine.  I was assuming that Folder\ and Folder\* would have a different behavior since there was a distinction between the two in the documentation.

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.