• Batch command to put the file name in the Window header bar

    From Wade Garrett@21:1/5 to All on Wed Feb 8 13:51:02 2023
    XPost: alt.msdos.batch

    If I write a batch file to do something out of batch commands, how do I get that batch file to put in the Windows header bar the name of that file?

    Is there an "output to the window title" command in Windows batch language?
    --
    My wife asked me to take her to one of those restaurants where they make
    the food right in front of you. So I took her to Subway...and that¢s how
    the fight started.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Wade Garrett on Wed Feb 8 19:21:29 2023
    XPost: alt.msdos.batch

    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands, how do I get that batch file to put in the Windows header bar the name of that file?

    Is there an "output to the window title" command in Windows batch language?

    only at the time you start the batch, not afterwards.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zaidy036@21:1/5 to Andy Burns on Wed Feb 8 16:11:17 2023
    XPost: alt.msdos.batch

    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands, how do
    I get
    that batch file to put in the Windows header bar the name of that file?

    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to All on Thu Feb 9 05:22:27 2023
    XPost: alt.msdos.batch

    On Wed, 8 Feb 2023 16:11:17 -0500, Zaidy036 wrote:
    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands, how do
    I get
    that batch file to put in the Windows header bar the name of that file?

    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    The annoying thing about the TITLE command is that, there's no way to
    restore the original title back, after it has been changed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Char Jackson@21:1/5 to jj4public@outlook.com on Wed Feb 8 18:23:28 2023
    XPost: alt.msdos.batch

    On Thu, 9 Feb 2023 05:22:27 +0700, JJ <jj4public@outlook.com> wrote:

    On Wed, 8 Feb 2023 16:11:17 -0500, Zaidy036 wrote:
    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands, how do
    I get
    that batch file to put in the Windows header bar the name of that file? >>>>
    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    The annoying thing about the TITLE command is that, there's no way to
    restore the original title back, after it has been changed.

    Can you store it in a string variable, so that you can set it back to
    the original value later?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wade Garrett@21:1/5 to Char Jackson on Wed Feb 8 20:05:50 2023
    XPost: alt.msdos.batch

    On 2/8/2023 7:23 PM, Char Jackson wrote:
    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    The annoying thing about the TITLE command is that, there's no way to >>restore the original title back, after it has been changed.

    Can you store it in a string variable, so that you can set it back to
    the original value later?

    What's needed is that string variable to get the file name because the file name changes depending on the use, and then save it into that variable.

    Something like this pseudo code

    set TITLE=getfilename(current batch file name)
    --
    Maybe I was raised wrong, but I was taught if you wanted something,
    you worked for it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zaidy036@21:1/5 to All on Wed Feb 8 21:06:41 2023
    XPost: alt.msdos.batch

    On 2/8/2023 5:22 PM, JJ wrote:
    On Wed, 8 Feb 2023 16:11:17 -0500, Zaidy036 wrote:
    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands, how do
    I get
    that batch file to put in the Windows header bar the name of that file? >>>>
    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    The annoying thing about the TITLE command is that, there's no way to
    restore the original title back, after it has been changed.
    what would be the purpose?
    You may issue the TITLE as many times as you would like. I have a batch
    that at start sets a title (.xyz.bat) to differentiate it from the bat
    file itself (_xyz.bat) and then near the end of the batch sets a new
    Title (0) so that the batch can run a second time without interference
    to the first CMD window which stays open. I have a %1 variable to
    position the CMD windows so they do not overlap using Nirsoft's Multimonitortool

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to Wade Garrett on Thu Feb 9 10:02:53 2023
    XPost: alt.msdos.batch

    On Wed, 8 Feb 2023 20:05:50 -0500
    Wade Garrett <wade@cooler.net> wrote:

    On 2/8/2023 7:23 PM, Char Jackson wrote:
    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    The annoying thing about the TITLE command is that, there's no way to >>restore the original title back, after it has been changed.

    Can you store it in a string variable, so that you can set it back to
    the original value later?

    What's needed is that string variable to get the file name because the file name changes depending on the use, and then save it into that variable.

    Something like this pseudo code

    set TITLE=getfilename(current batch file name)

    /That/'s easy:
    title %0

    Otherwise yes, set a string var:

    set mytitle="Have a Nice Day"
    rem set
    title %mytitle%
    pause
    rem change
    title temporary title
    pause
    rem restore
    title %mytitle%

    but yes, AFAICT there's no way to pick up the current title string.
    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stan Brown@21:1/5 to All on Thu Feb 9 07:40:26 2023
    XPost: alt.msdos.batch

    On Wed, 8 Feb 2023 16:11:17 -0500, Zaidy036 wrote:

    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands,
    how do I get that batch file to put in the Windows header bar
    the name of that file?

    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    Wow - I thought I was pretty good with CMD, but that's a new one on
    me. It works in both native Windows CMD and TCC/LE. Thanks!

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philip Herlihy@21:1/5 to All on Fri Feb 10 12:37:32 2023
    XPost: alt.msdos.batch

    In article <MPG.3e4eb3c3275868f1990055@news.individual.net>, Stan Brown wrote...

    On Wed, 8 Feb 2023 16:11:17 -0500, Zaidy036 wrote:

    On 2/8/2023 2:21 PM, Andy Burns wrote:
    Wade Garrett wrote:

    If I write a batch file to do something out of batch commands,
    how do I get that batch file to put in the Windows header bar
    the name of that file?

    Is there an "output to the window title" command in Windows batch
    language?

    only at the time you start the batch, not afterwards.

    the TITLE command changes the title of the current window at anytime
    while the batch is running.

    Wow - I thought I was pretty good with CMD, but that's a new one on
    me. It works in both native Windows CMD and TCC/LE. Thanks!

    One thing you could do is start a new command interpreter instance, using the CMD command. Set the TITLE in that, and it's visible in the title bar, but when you EXIT the layered instance, the original title is visible again. Commands:

    TITLE First
    CMD
    TITLE Second
    EXIT

    .. obviously you'd include other commands, depending on what you wanted to do.

    --

    Phil, London

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)