home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,895 of 68,980   
   Herbert Kleebauer to R.Wieser   
   Re: how do I set the window title to the   
   04 Jul 22 12:52:51   
   
   XPost: microsoft.public.windowsxp.general   
   From: klee@unibwm.de   
      
   On 04.07.2022 09:53, R.Wieser wrote:   
      
   >>> As a check I put the above in a batchfile,   
   >>   
   >> You shouldn't have done that. Just enter it at the command prompt.   
   >   
   > Ackkk....   thats quite a bit of a difference.  I've just tried it that way   
   > and it works.    And now I also understand why you need that "call" in   
   > there.   
   >   
   > Not usefull to me though, as I have zero wish to type it in every time I   
   > open a command window. :-(   
      
   It is the same as like   
      
   for %i in (hello world) do echo %i   
      
   It does work on the command line but not in a batch file. If you want   
   to use it in a batch file, you have to add a few %:   
      
   set dd=cd   
   doskey cd=cd $* ^&call title %%%%dd%%%%   
      
      
   > And I would still suggest to put that "set dd=cd" part *inside* the doskey   
   > macro - other batchfiles could overwrite the "dd" environment variable and   
   > leave you with unexpected results.   
      
   You can use any name which is not used by other batch code instead   
   of "dd". But if there is a naming conflict with an other batch, then   
   maybe it is better the doskey macro stops working than the other   
   batch stops working.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca