Batch file commands and progress bar

Discussion in 'Scripting' started by Mvp77, Feb 26, 2018.

  1. Mvp77

    Mvp77 MDL Junior Member

    May 16, 2016
    58
    4
    0
    Coding a standalone progress bar is really easy, but how to code a bar that shows a command progress percentage?
    I don't know, maybe using the "copy" command...
     
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    Found a lot of 'examples' but none of them is working properly. Afaik it's not possible :g:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,586
    340
  4. Mvp77

    Mvp77 MDL Junior Member

    May 16, 2016
    58
    4
    0
  5. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    OK: counter != progress bar :D.

    There are several commandline tools that show a bar, wget being another example, still the functionality seems to come only with these tools. So far i never found any CMD code that was working properly :g:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,964
    907
    60
    In the early versions of this project: https://forums.mydigitallife.net/threads/oem-recovery-partition-creator-for-windows.21978/ AnarethoS used a file he created in AuditIT that would give you a percentage with progress bar
    while running his batch file. ie, unpacking install.wim with imagex.
    He may still have this. You could also Google "autoit progress bar". examples come up, even in youtube...

    I think he stopped using it once he changed to dism...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Mvp77

    Mvp77 MDL Junior Member

    May 16, 2016
    58
    4
    0
    #7 Mvp77, Feb 27, 2018
    Last edited: Feb 27, 2018
    (OP)
    I created a batch to automate different deployment tasks and I would like to add a progress bar for some commands.
    If it is not possible I switch to Powershell.
    I'm not interested in other solutions (AutoIt, wget...).
    Sorry... :)
     
  8. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,964
    907
    60
    AutoIT compiles an executable file you can use in your batch.
    ie,
    Code:
    @echo off
    PBar.exe dism /Apply-Image /Imagefile:R:\Install.wim /index:1 /ApplyDir:W:\
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Mvp77

    Mvp77 MDL Junior Member

    May 16, 2016
    58
    4
    0
    Maybe it's better using robocopy... :)
     
  10. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    Something like here maybe?
     
  11. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    895
    482
    30
    take a look at: esentutl.exe (built in)

    e.g. esentutl.exe /y "%~1" /d "%~2" /o
     
  12. Mvp77

    Mvp77 MDL Junior Member

    May 16, 2016
    58
    4
    0
    Thanks to all of you for tips and suggestions, but I'm really tired of Microsoft... now I need a rest. :)
    Anyway, it seems really hard to link a progress bar to any command.
    PowerShell should be the evolution of the old batch (or the solution to the old problems).
    But did you wonder why nobody uses it...? (Maybe because it's even worse...)
    Also, the only idea of recoding everything makes me feel bad... and for what? a bar? looolll...
    But why in this world even the easiest thing become impossible?
     
  13. Master 7

    Master 7 MDL Novice

    Aug 30, 2019
    1
    0
    0
    [QUOTE = "Mvp77, post: 1414130, member: 723960"] Codificar una barra de progreso independiente es realmente fácil, pero ¿cómo codificar una barra que muestre un porcentaje de progreso de comando?
    No lo sé, tal vez usando el comando "copiar" ... [/ QUOTE]
    Comentas que codificar la barra de progreso es fácil. ¿Cambiarle el color es igual de fácil siendo la barra de progreso del instalador de Windows 10? Quisiera saber cómo hacerlo, y si tuvieras la amabilidad de enseñarme cómo hacerlo. Saludos.
     
  14. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    • Señor, escribimos en inglés, también encaja con errores.
    • Sir, we write in English, also fits with mistakes.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...