Parameter for unzip to folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Jeff D
    Forum Member
    • Jul 2005
    • 8

    Parameter for unzip to folder

    Hi - trying to get a zip file to unzip to a specified directory

    c:\logos\

    At the moment I can only get it to unzip the contents to the desktop
    using this string: %DeskTop%

    I have tried various alterations:

    %c:\logos% etc etc

    none work - can someone please tell me what the string should be?

    thanks
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2
    don't forget to double up on your slashes
    Code:
    Zip.Extract("Autoplay\\docs\\test.zip", "*.*", "C:\\logos, true, true, "", ZIP_OVERWRITE_ALWAYS, nil)

    Comment

    • Jeff D
      Forum Member
      • Jul 2005
      • 8

      #3
      Thanks for rapid reply - do I put all that code in the line
      Heading is: Unzip to folder

      In the line (currently) is: %DeskTop%

      I was hoping to just replace the %DeskTop% with whatever reference to the folder on desktop

      Comment

      • Jeff D
        Forum Member
        • Jul 2005
        • 8

        #4
        Helllppppppp - still cannot get program to unzip files to chosen directory!!

        Comment

        • Worm
          Indigo Rose Customer
          • Jul 2002
          • 3971

          #5
          Post your code snippet, and we'll be able to help you more. Otherwise, we grabbing at straws trying to figure out what you're doing.

          Comment

          • Jeff D
            Forum Member
            • Jul 2005
            • 8

            #6
            ZipFile.Extract("%ScrDir%\logos.zip","","","%DeskT op%")

            The above is the command on mouse click

            thanks for help :-)

            Comment

            • Worm
              Indigo Rose Customer
              • Jul 2002
              • 3971

              #7
              which software are you using? AMS?

              Comment

              • eric_darling
                Indigo Rose Customer
                • Jun 2002
                • 1805

                #8
                And is it version 5?
                Eric Darling
                eThree Media
                http://www.ethreemedia.com

                Comment

                • Jeff D
                  Forum Member
                  • Jul 2005
                  • 8

                  #9
                  AMS - Version 4

                  Comment

                  • eric_darling
                    Indigo Rose Customer
                    • Jun 2002
                    • 1805

                    #10
                    A-ha! That explains a lot.

                    First of all, are you sure the folder will already exist for all users on their C: drive?
                    If not, I'm pretty sure you need to create the directory to get it to work. This task would be easier with 5.0.
                    Eric Darling
                    eThree Media
                    http://www.ethreemedia.com

                    Comment

                    • Jeff D
                      Forum Member
                      • Jul 2005
                      • 8

                      #11
                      I had hoped (poss. naively) that I would be able to stipulate a directory to install the file(s) to.

                      Is APM 5 any better for this solution?

                      thanks

                      p.s. how can I replace the small yellow cd icon in my projects?

                      Comment

                      • eric_darling
                        Indigo Rose Customer
                        • Jun 2002
                        • 1805

                        #12
                        Yes, this would be easier with 5.0. Actually, once you get used to the software, just about everything is easier in 5.0. It's much more powerful.

                        You can stipulate a directory - so long as it already exists.

                        You can specify a custom icon for your projects in the Projects -> Settings -> Build tab. I've attached a screenshot to help you identify it.
                        Attached Files
                        Eric Darling
                        eThree Media
                        http://www.ethreemedia.com

                        Comment

                        • Worm
                          Indigo Rose Customer
                          • Jul 2002
                          • 3971

                          #13
                          Ahhhh, I see.

                          you need to make sure the folder exists before you can extract to it. Do a

                          Folder.Create("C:\LOGOS")


                          then do your extract

                          ZipFile.Extract("%srcdir%\logos.zip, "C:\logos")


                          And yes, AMS5 is a much more inuitive IDE. It is worth every penny for the upgrade.

                          Comment

                          • Jeff D
                            Forum Member
                            • Jul 2005
                            • 8

                            #14
                            Does the directory just have to exist when compiling the project - what would happen at the other end if the user did not have that directory existing already?

                            Thanks

                            Jeff ;-)

                            Comment

                            • Worm
                              Indigo Rose Customer
                              • Jul 2002
                              • 3971

                              #15
                              It wouldn't extract, that's why I did the Folder.Create before extracting to increase my chances of the folder actually being there.

                              Comment

                              Working...
                              X