Results 1 to 11 of 11

Thread: compactar diretorio com progressbar

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2022
    Posts
    4

    Cool compactar diretorio com progressbar

    Prezados colegas:

    Estou em busca de um código em vb6 para compactar um diretorio e se possível utilizando controle .ocx para rar ou zip para não ter a necessidade de referenciar o caminho da instalação do winrar ou winzip e se possível com uma progressbar para o andamento da cópia/compactação.

    No formulário conter:

    Text1 para caminho do diretorio;
    Text2 para nome do arquivo a ser compactado;
    Text3 destino do arquivo compactado;
    Progressbar para andamento do progresso;
    Botão para executar ação;

    Agradeço desde já a atenção de todos. Muito obrigado

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,660

    Re: compactar diretorio com progressbar

    @gfranguelli:

    Welcome to the forum! Try https://www.example-code.com/vb6/zip.asp. And please try to write your posts in english. Okay? I used Google Translate to read your message. Perhaps it will produce acceptable results for posting in english.

  3. #3
    Hyperactive Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    419

    Re: compactar diretorio com progressbar

    Quote Originally Posted by Peter Swinkels View Post
    And please try to write your posts in english. Okay?
    I found it strange, because what gfranguelli wrote, I understood perfectly because it was in Portuguese ... but what you wrote I didn't understand because I need to use google translator too .... then I woke up and saw that my page needed to be translated.

    And speaking of google translations, these days I opened a post and there were 3 lines written in English, when I activated the translation plugin, google translator omitted the third line in the translation ... I had to select the text and use another translator to find out what was written ..... strange that.

  4. #4
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,574

    Re: compactar diretorio com progressbar

    Quote Originally Posted by Peter Swinkels View Post
    Are you aware that this is a paid component?

  5. #5
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,660

    Re: compactar diretorio com progressbar

    @Eduardo: no I wasn't aware of that. Sorry.

    Try: https://www.vbforums.com/showthread....-file-from-vb6

  6. #6
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,527

    Re: compactar diretorio com progressbar

    OP---not sure if you are following all that above or not...but, I took the liberty to take one of the examples from this link (was one from above, eventually, I think) and adopt one of dilettante's suggestions and make it more plainly for YOUR use (at least what I think you are looking for). It uses a progressbar, and allows you to select a directory to archive as well as a directory to save the archived zip file it creates. It is NOT my work, just some simple mods to help you.

    You will have to download zlibWapi.dll (available at https://www.dlldownloader.com/zlibwapi-dll/). Simply copy it into my attached program's directory...no registration required.

    Good luck
    Attached Files Attached Files
    Sam I am (as well as Confused at times).

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2022
    Posts
    4

    Re: compactar diretorio com progressbar

    Dear colleagues, thank you very much for your attention here.

    Unfortunately I am not able to make the progressbar follow the process of evolution of the compression of the files that are in the directory.

    I have a file that its code in turn is relatively simple but I am not able to edit it for correct operation.

    Could be putting the code here to analyze and someone fix it?

    Thank you very much once again everyone.
    Last edited by gfranguelli; Dec 18th, 2022 at 10:48 AM.

  8. #8
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,527

    Re: compactar diretorio com progressbar

    Sure...let's see the code.
    Sam I am (as well as Confused at times).

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2022
    Posts
    4

    Re: compactar diretorio com progressbar

    Quote Originally Posted by SamOscarBrown View Post
    Sure...let's see the code.
    Dear Sam, thank you very much for taking the time to answer my topic and I'm sorry for not getting back to you sooner, life's setbacks.

    See if you can fix the code below, because the progress bar doesn't follow the progress of the compression, a relatively small directory takes a long time, the friend who reports the message comments that he should modify "objDOS_ReceiveOutputs", I don't know how to do that!

    error code link:
    https://www.vbforums.com/showthread....th-progressbar


    I'll take the opportunity and send you another link below a source code in Delphi that appears to be working, is it possible to convert this code to VB6?

    https://forum.scriptbrasil.com.br/to...ando-com-zlib/

    Thank you very much for your attention once again, and a happy 2023 that begins.

  10. #10
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,527

    Re: compactar diretorio com progressbar

    Please post YOUR CODE for your progress bar.
    Sam I am (as well as Confused at times).

  11. #11

    Thread Starter
    New Member
    Join Date
    Jun 2022
    Posts
    4

    Re: compactar diretorio com progressbar

    Dear Sam!

    Attached are the files to be downloaded.
    There is a grades_help.txt file for some notes.

    Thank you so much again.
    Attached Files Attached Files

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