Results 1 to 9 of 9
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TITLE command in batch file (WinXP/)

    I just finished reading the 1998 "NT Server 4" Exam prep book. On page 608 it includes in a table of commands TITLE: "Modifies the title in the title bar of the command window".

    Neat.
    Each batch file can start with
    Title %0
    and be much more informative.

  2. #2
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TITLE command in batch file (WinXP/)

    <img src=/S/cool.gif border=0 alt=cool width=15 height=15> Wish I'd found out about this one while still making heavy use of batch files. Still, it may help with those few that I still deploy now & then.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: TITLE command in batch file (WinXP/)

    Hmmmm, sorta like what I still call my "DOS Prompt" shortcut on my desktop in both XP and Vista.

    cmd.exe /s /k title Big Al's Command Window which results in the attached.
    Attached Images Attached Images

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TITLE command in batch file (WinXP/)

    Isn't that some sort of copyright breach? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Alan

  5. #5
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TITLE command in batch file (WinXP/)

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> he might just get away with it if we don't tell anyone!
    (What happens in the Lounge, stays in the Lounge.) <img src=/S/wink.gif border=0 alt=wink width=15 height=15>
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 31 Times in 31 Posts

    Re: TITLE command in batch file (WinXP/)

    Do you expect Bill Gates to butt in with "All your command windows are belong to us"?
    He's retired now, you know...

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TITLE command in batch file (WinXP/)

    Glad you liked it, Tim.
    Now, the Homework Assignment:
    Write a short batch file (DOS, not script) to place a single line "Title %0" ahead of all other lines in each batch file in a folder without changing the date/time stamp.
    Heh heh!

  8. #8
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,555
    Thanks
    36
    Thanked 212 Times in 189 Posts

    Re: TITLE command in batch file (WinXP/)

    If it precedes all lines in the BATch file, it should really start with an @, as in <pre>@title %~n0</pre>

    (do you really want a BATch file to do what you say? If so you will need something like the Resource Kit utility TOUCH, to set the timestamp back...
    BATcher

    milliHelen (sub-unit): that quantity of female facial beauty sufficient to launch a single ship

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TITLE command in batch file (WinXP/)

    > ~n
    Hide the path, right?
    Nice!
    Where (from) did you dig (up) that?

    >do you really want a BATch file to do what you say?
    Ultimately, yes, but it's the sort of task I like to set myself when I'm waiting for someone/thing and I've finished reading my book.
    I have a copy of TOUCH, thanks, from 10/27/88, unless someone has changed the file date (grin!). Also my trusty copy of PCMagazine's "DOS Power tools".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •