:initProgress max format -- initializes an internal progress counter and display the progress in percent :: -- max [in] - progress counter maximum, equal to 100 percent :: -- format [in,opt] - title string formatter, default is '[P] completed.' set /a "ProgressCnt=-1" set /a "ProgressMax=%~1" set "ProgressFormat=%~2" if not defined ProgressFormat set "ProgressFormat=[PPPP]" set "ProgressFormat=%ProgressFormat:[PPPP]=[P] completed.%" call:doProgress EXIT /b