Zip it up!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    Zip it up!

    Can someone show me an example of the Zip plug-in, zipping up files from different areas?
  • longedge
    Indigo Rose Customer
    • Aug 2003
    • 2498

    #2
    ??? - Well I can't find it now but somewhere in the forum one of the IR staff posted a working example of creating a zip by using the file browse dialogue to -

    a)name the new zip file and then
    b) select the file/s to go into the zip.

    The action is 'native' in AMS5Pro isn't it?

    I have the example project if (like me) you can't find it.

    Comment

    • Bruce
      Indigo Rose Customer
      • Jun 2001
      • 2134

      #3
      Originally posted by longedge
      ??? - Well I can't find it now but somewhere in the forum one of the IR staff posted a working example of creating a zip by using the file browse dialogue to -

      a)name the new zip file and then
      b) select the file/s to go into the zip.

      The action is 'native' in AMS5Pro isn't it?

      I have the example project if (like me) you can't find it.
      longedge, yeah I've seen it here some where but can't locate it.

      Comment

      • Worm
        Indigo Rose Customer
        • Jul 2002
        • 3971

        #4
        I believe it was Desmond, and I think this is the post

        Comment

        • Corey
          Indigo Rose Staff Alumni
          • Aug 2002
          • 9745

          #5
          Desmond rules. :yes

          Comment

          • Bruce
            Indigo Rose Customer
            • Jun 2001
            • 2134

            #6
            That was very good info but... Is there a way to grab up files from different folders and add them all to a zip file? I didn't see what I was looking for in those examples i.e.

            C:\myfolder\myfile.ext
            And…
            C:\theirfolder\anotherfolder\myfile.ext
            And…
            C\ myfolder\thatfolder\all_of_this_folder

            Or am I brain dead and didn't see it?

            Comment

            • csd214
              Forum Member
              • Oct 2001
              • 939

              #7
              My experience is limited; I have used the Zip command only once. I wanted to add several files (sGenericName = "A?Ident.*") in a specific folder (sDataFolder = something). I created a table

              tPaFiles = File.Find(sDataFolder.."\\", sGenericName, false, false, nil, nil);

              Additionally I wanted to add a specific file in another directory (sStatusIni = full path file name).

              local nFileCounter = Table.Count(tPaFiles);
              tPaFiles[nFileCounter + 1] = sStatusIni; -- add the last file


              Zip.Add(sZipFullPathName, tPaFiles, false, "", 9, nil, false); -- create the zip archive

              So, by managing the table (here tPaFiles) it seems to be possible to add whatever files/directories you want.

              Comment

              • Bruce
                Indigo Rose Customer
                • Jun 2001
                • 2134

                #8
                Ok... Trying to zip a file (not from a table) from my C drive i.e. C:\Sunplus\Sunplus.mdb

                and put it into a zip called sbbackup.zip on my desktop... Here's what I have, I know it's wrong If someone could help me out

                Zip.Add(_DesktopFolder.."\\"sbbackup.zip, C:\Sunplus\Sunplus.mdb, true, "", 5, nil, false);

                Comment

                • Worm
                  Indigo Rose Customer
                  • Jul 2002
                  • 3971

                  #9
                  Off the top of my head, I'd say this
                  Code:
                  Zip.Add(_DesktopFolder.."\\sbbackup.zip", "C:\\Sunplus\\Sunplus.mdb", true, "", 5, nil, false);

                  Originally posted by Bruce
                  Ok... Trying to zip a file (not from a table) from my C drive i.e. C:\Sunplus\Sunplus.mdb

                  and put it into a zip called sbbackup.zip on my desktop... Here's what I have, I know it's wrong If someone could help me out

                  Zip.Add(_DesktopFolder.."\\"sbbackup.zip, C:\Sunplus\Sunplus.mdb, true, "", 5, nil, false);

                  Comment

                  • Bruce
                    Indigo Rose Customer
                    • Jun 2001
                    • 2134

                    #10
                    Got it:
                    Zip.Add(_DesktopFolder.."\\sbbackup.zip", {"C:\\Sunplus\\Sunplus.mdb"}, true, "", 9, ZipCallBack, true);

                    Thanks Worm

                    Comment

                    • Bruce
                      Indigo Rose Customer
                      • Jun 2001
                      • 2134

                      #11
                      Here's how to add them all:

                      Zip.Add(_DesktopFolder.."\\sbbackup.zip", {"C:\\Sunplus\\OPER.MDB", "C:\\Sunplus\\Release.txt", "C:\\Sunplus\\Suntouch.crd", "C:\\WINDOWS\\SUNTOUCH.INI", "C:\\Sunplus\\Pictures\\*.*"}, true, "", 9, ZipCallBack, true);

                      Comment

                      Working...
                      X