Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Create a zip file

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 618 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 05/08/2008 at 09:22, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi!

      I've a small problem with the ZipFile-class.

      First try: Open a file and extract it in a directory.

      ZipFile *myzip = ZipFile::Alloc();
                          
                          if(myzip->Open(Filename(tmp), TRUE, FALSE))
                               if(!myzip->ExtractToDirectory(Filename(download_name.GetString(i, "corrupt") + ".zip"), GeGetPluginPath() + Filename("/tmp/"), TRUE))
                                    MessageDialog("Could not extract");

      The MessageDialog is shown.. does anyone know why?

      Second try: Create a zip file and put in some files, but what method is responsible to save this zip? I can't find it...

      Thanks 🙂

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 07/08/2008 at 07:23, xxxxxxxx wrote:

        Hi!

        Thats very strange.. I found a thread with the same problem (version 9.5).

        Does anyone of you work with the ZipFile Class?

        Bye...

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 07/08/2008 at 09:10, xxxxxxxx wrote:

          Hi!

          It works. Sometimes the principle of try and error is not the worst one..

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 08/08/2008 at 04:26, xxxxxxxx wrote:

            Would you mind sharing how it finally worked? If this is a common problem it would be helpful for the next one.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 08/08/2008 at 07:32, xxxxxxxx wrote:

              Hi!

              Sure I share the result 🙂 I don't know if this is really correct, but it works, so it should be correct.

              At first I open the zip file and browse through the zip file.

              > <code>
              > ZipFile *myzip = ZipFile::Alloc();
              >
              > if(myzip->Open(tmp, TRUE, FALSE))
              > {
              >      myzip->GoToFirstFile();
              >      do
              >      {
              >           if(!myzip->ExtractCurrentFile(Filename(<destination>), TRUE))
              >                MessageDialog("Could not extract the file");
              >
              >      }while(myzip->GoTonextFile());
              > }
              > else
              >      GePrint("Cannot open zip file...");
              >
              > myzip->Close();
              >
              > ZipFile::Free(myzip);
              > </code>

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 09/08/2008 at 06:16, xxxxxxxx wrote:

                thx

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post