Jump to content

How integrate a counter in batch ?


Recommended Posts

Hi all,

I have a batch to install hotfixes ... all run fine but I havn't any progress bar and I use just the "time" function ... but it isn't perfect ... so if anyone has a solution to integrate a counter, post !

My actual batch :

@echo off
color 0f
title Patchs
cd /d "%~dp0"
time /t
echo.
echo ... Patchage ...
for %%a in (*hf.exe) do (
start /wait "" %%a /quiet /norestart )
exit

In fact, I would like the batch say :

Install in progress ...
30
29
28
27
...

I have search with for /l command but I don't know how combine with the first for command ...

Link to comment
Share on other sites


Thanks Doc, but doesn't work because I use for, no ?

This is what I make :

@echo off
cd /d "%~dp0"
echo ... Patchage ...
set i=29
for %%a in (*hf.exe) do (
echo %i%
pause <- just for test! instead "start /w ...."
set /a i = %i% - 1
)
exit

Result : Always display 29 !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...