1.

Solve : Add variable to DOS command prompt title?

Answer»

Is there a WAY to add a varible to the DOS command prompt title in a batch file? I wanted to do something like the following:

set /p var=Enter the name of the file and the .img extension (filename.img):
title The file now being programmed is var into your card

There's a different part of the code that I also wanted to add a VARIABLE to the title:

for /f %%a in ('dir *.img /b') do (set var=%%a)
title The file now being programmed is %%a
I wasn't aware batch files had titles. I'm sure that they can if you REM them in, but... What exactly do you want it to look like?If you use a title statement within your loop, it should work.

Something like this:

Code: [Select]@echo off
for /l %%i in (1,1,10000) do (
title Now Processing %%i
)

Note: Batch files run quick. You may only see the FINAL result! 8-)

The batch file I run is for USERS who are programming pcmcia cards for a vehicle diagnostic tool. The batch file is slow because it waits for user input, one step at a time, then launches an executable program that takes as much as 30 minutes. I was trying to snazz it up a little.

I'll try the code Monday. THANKS.



Discussion

No Comment Found