Page 2 of 2 FirstFirst 12
Results 41 to 49 of 49

Thread: zip and unzip

  1. #41
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,540

    Re: zip and unzip

    Quote Originally Posted by Karl77 View Post
    VERY interesting.
    I tried the vbZip project, and it works flawless.
    Like this:
    Code:
    vbzip -o "T:\ZIPTEST" x "T:\Desktop\bla.zip"
    When I want to use your work in my projects, I only need to unzip a zip file to a folder.
    I tried the basic project.

    Code:
    Private Sub Command4_Click()
        Dim dblTimer        As Double
        Dim bResult         As Boolean
        Dim sLastError      As String
    
        dblTimer = Timer
        Set m_oZip = New cZipArchive
        m_bCancel = False
        With m_oZip
            .OpenArchive "T:\Desktop\bla.zip"
            Set m_oExtractInMemory = m_oZip
            bResult = .Extract("T:\ZIPTEST")
            Set m_oExtractInMemory = Nothing
            sLastError = .LastError
        End With
        Set m_oZip = Nothing
        labProgress.Caption = IIf(bResult, "Done. ", sLastError & ". ") & Format(Timer - dblTimer, "0.000") & " elapsed"
    End Sub
    This doesn't create the folder to extract to.
    And even when the folder exists, no extracted file comes in.
    I thought the .Extract method would do this.

    Can you give me a hint please?

    Karl
    how to zip file with password?

  2. #42

  3. #43
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    617

    Re: zip and unzip

    Quote Originally Posted by Undotgiven View Post
    i want to zip and unzip files and folder trough vb but i dont know how to begin, i found that there is a dll called zipfldr but i've found nothing in the forum, if anyone know the syntax i will appreciate your help...
    Sorry for being late but you can look at this link...

    https://vbmania.com.br/index.php?modulo=detalhe&id=7076

    The program is in Portuguese .... it is very simple, but you can use the google translator to translate it to your languag

  4. #44
    Addicted Member jj2007's Avatar
    Join Date
    Dec 2015
    Posts
    206

    Re: zip and unzip

    Quote Originally Posted by Episcopal View Post
    Sorry for being late but you can look at this link...

    https://vbmania.com.br/index.php?modulo=detalhe&id=7076

    The program is in Portuguese .... it is very simple, but you can use the google translator to translate it to your languag
    Requires registration and login. Perhaps you could elaborate a bit what "the program" does, and whether it's worthwhile registering in a language that most members here don't understand.

  5. #45
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    617

    Re: zip and unzip

    Quote Originally Posted by jj2007 View Post
    Requires registration and login. Perhaps you could elaborate a bit what "the program" does, and whether it's worthwhile registering in a language that most members here don't understand.
    Registering costs nothing .... I don't know English either, and I use google translator to translate and interact with vbforum ... and this could be the other way around ...
    Attached Files Attached Files

  6. #46
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    617

    Re: zip and unzip

    If you have comments it will be in Portuguese of Portugual ..... as I said google translator can be used ..... I always do that ...
    Attached Images Attached Images  
    Last edited by Episcopal; Apr 25th, 2023 at 08:23 AM.

  7. #47
    Addicted Member jj2007's Avatar
    Join Date
    Dec 2015
    Posts
    206

    Re: zip and unzip

    Thanks, Episcopal. However, this works only if WinZip is installed. Perhaps you could add other checks, such as for this key:

    HKEY_CLASSES_ROOT\Applications\7zFM.exe\shell\open\command

  8. #48
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,632

    Re: zip and unzip

    Quote Originally Posted by jj2007 View Post
    Thanks, Episcopal. However, this works only if WinZip is installed. Perhaps you could add other checks, such as for this key:

    HKEY_CLASSES_ROOT\Applications\7zFM.exe\shell\open\command
    WinZip? Almost certainly 7-Zip.

  9. #49
    Addicted Member jj2007's Avatar
    Join Date
    Dec 2015
    Posts
    206

    Re: zip and unzip

    Quote Originally Posted by OptionBase1 View Post
    WinZip? Almost certainly 7-Zip.
    Users have all kinds of archivers installed. WinZip is not free, therefore it's less likely to find it. Or maybe you find an installation, but the trial period is over...

    Check the HKEY_CLASSES_ROOT\.zip key, and get thoroughly lost in the registry. For example, I have dozens of entries for "C:\Program Files (x86)\PeaZip\PEAZIP.EXE" "-ext2here" "%1" although I always use 7-Zip or FreeArc. Every mad software developer thinks he has the right to pollute the registry.

    HKEY_CLASSES_ROOT\Applications is a good starting point for a search for installed archivers.
    HKEY_CLASSES_ROOT\zip_auto_file\shell\open\command might yield a result, too.

    It's one big fat mess - therefore I appreciate wqweto's effort to find a solution that doesn't depend on third party installations.

Page 2 of 2 FirstFirst 12

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