Results 1 to 10 of 10

Thread: Zipping Files

  1. #1

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181

    Zipping Files

    Is there any way to zip and unzip files without the use of a special dll? I have done it with the unzip10.dll, but need to do it without the dll? Is this possible? Thanks for any help!!!!

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    you could Shell pkzip, or WinZip, or CCZip, (or a myriad of others ). Or are you trying to make a Zip utility of your own?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Smile This worked for me

    And in back-ground (invisible to user):

    Rem Call Shell(Environ("ComSpec") & "/c pkunzip YourFile.zip -sYourPassword", vbHide)

    (no spaces between -s and the password)

    YourPassword is optional, off course, in case you used it when zipping the file..
    Combat poverty: kill a poor!!

  4. #4

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181
    I need to zip and unzip files behind the scenes of a program and can't have the added bulk of a .dll.

    I tried

    Call Shell(Environ("ComSpec") & "/c pkunzip C:\trial1.zip

    and it told me that the file could not be found despite it being a valid file location. What else can I try??? Thank you all...

  5. #5
    gaffa
    Guest
    If you don't want ot use an external DLL, or an external app (which is more trouble than the DLL approach), then you will be limited to writing your own dompression/decompression code inside your app, which to my mind seems like a whole lot of unnecessary work. But if you want to take that path, then the basic algorithm is available on the InfoZip site somwhere.

    Why don't you want to have an external DLL (given that you already have a number of external DLL's anyway cos you (I assume) are writingthe app in VB)?

    - gaffa

  6. #6

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181
    I really want to create a simple app that is stand-alone (not possible in VB as far as I know). All that it needs to do is:

    1) unzip a set of files
    2) execute one of these unzipped files (stand-alone freeware app)
    3) wait for the user to click a stop button
    4) when stop is clicked...stop the running program and zip all files back up

    I figured that since I can't creat an app in VB that will run on its own, that I would hope that the user would have the bare-bone control runtimes already installed (from IE, etc)...I knew they wouldn't have unzip10.dll, so I was hoping to embed this functionality into the program.

    Anyone have any ideas on how else I could accomplish the four steps that I need?

  7. #7
    gaffa
    Guest
    I certainly wouldn't be hedging my bets on the client machines having the correct runtimes. In my experience, that approach works maybe 40% of the time - the other 60% percent fail rate means that you get some very displeased clients.

    There are programs out there that will static-link the DLL's into an EXE file, removing the need for support files. I think one is called Crunch, and there's another one I can't remember the name of.

    If you're feeling game, you could also control the compilation process instead of letting VB do it (you call c2.exe and then link.exe your self with the appropriate parameters). The link.exe, which is the bit that actualy decides how the program links to DLL's and other files, can be set up to static link. But I'm not sure how to actually achieve this task. I just know it can be done.

    - gaffa

  8. #8

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181
    Thank you for your help. I have no experience in C++, but I have access to it at school. For the simple tasks that I need to do, maybe I can create something. You don't happen to know another language like that do you? I just ask to see where some other helpful forums might be...

    Thanks again!

  9. #9
    gaffa
    Guest
    You might try Delphi. I'm not much chop at Delphi, but it certainly builds standalone EXE files, and I think you have the option to static link dependency files.

    - gaffa

  10. #10

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181
    Thank you!!! I will try to find some place that has a version of Delphi...

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