|If you want to be flashy, this will create and demo a standard "progress bar", but it needs either debug or vbscript to create a small binary (.com) file:|
AND, as razor pointed out, only works on 32-or-less-bit systems!
::====== begin script "progbar.bat"
e100 B4 03 CD 10 80 FE 01 72 07 80 EE 01 B4 02 CD 10 CD 20 DB
:: demonstrates a "progress bar" using "up.com"
@echo off & setlocal
if exist up.com goto :zero
debug up.com <%dpn0.bat 2>nul >nul
for /f "tokens=* delims=" %%a in (up.com) do set blok=%%a
set /a nn=1
set /a nn+=1
if %nn% equ 80 goto :eof
::===== end script
If you unfortunate enough to not have debug, this vbscript can build the binary:
'====== begin vbscript
'====== end vbscript
To use the bar in this application, first you would need to divide the total size of all the combined files by 80 (or whatever size you want the bar to be, i used standard screen width).
f/e call this "bloksize"
Then, as your batch works, it would keep a running total of sizes of files deleted. Whenever the total modulo bloksize is zero, call progbar to display another block.
(or if you don't like modulo, just zero the counter each time it hits bloksize).
But I'm doubtful of the utility of this whole concept, because deleting even large files just doesn't take much time. One byte is modified in the directory, and the allocation table is freed up. The file itself is not actually deleted or modified.
ps: if you're scared of the binary executable, maybe this listing will make you more comfortable:
B403 MOV AH,03 move 3 into AH
CD10 INT 10 this interrupt gets the cursor position
80FE01 CMP DH,01 compare dh,1
7207 JB 0110 jump to exit if less than 1
80EE01 SUB DH,01 subt. 1 from current cursor posn.
B402 MOV AH,02 move 2 into AH
CD10 INT 10 this interrupt sets the cursor up one line
CD20 INT 20 this interrupt exits the program politely
DB this is the block character (219 dec.)