Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Please help
Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Moderator: DosItHelp
-
- Posts: 31
- Joined: 08 Sep 2017 06:10
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Do this at the command prompt:
You will see that 'pause' is added to the title or complete 'set /p' command is added to the title. Looks like this is just how 'title' command works - adds a command that stops the processing of the batch file.
Maybe anyone else has a better explanation.
Saso
Code: Select all
title test
dir
pause
set /p "somestr=enter something:"
Maybe anyone else has a better explanation.
Saso
-
- Posts: 31
- Joined: 08 Sep 2017 06:10
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Must be in one line of code
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
It has nothing to do with the title command. The currently executing command is always added to the window title, until it completes, and the pause command is running until you press a key. You can see this by opening a fresh command prompt and executing the pause command by itself.