Batch file commands and progress bar

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

  1. Mvp77

    Mvp77 MDL Novice

    May 16, 2016
    29
    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 MDL Guide Dog/Dev

    Aug 15, 2012
    15,146
    20,565
    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
    17,601
    15,443
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Mvp77

    Mvp77 MDL Novice

    May 16, 2016
    29
    4
    0
  5. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    15,146
    20,565
    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,535
    660
    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...
     
  7. Mvp77

    Mvp77 MDL Novice

    May 16, 2016
    29
    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,535
    660
    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:\
     
  9. Mvp77

    Mvp77 MDL Novice

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

    sebus MDL Guru

    Jul 23, 2008
    5,900
    1,790
    180
    Something like here maybe?
     
  11. KNARZ

    KNARZ MDL Addicted

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

    e.g. esentutl.exe /y "%~1" /d "%~2" /o
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Mvp77

    Mvp77 MDL Novice

    May 16, 2016
    29
    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?