Jump to content

Recommended Posts

Posted

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 ...


Posted

You use a variable as counter like

set i=0
set /A i = %i% + 1
echo %i%

I vour case, you when you want to count down, of course you would have to get the number of files first, set your counter to this value and then count down.

Posted

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 !

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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