home bbs files messages ]

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

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

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

   Message 41,938 of 42,547   
   Kerr-Mudd, John to R.Wieser   
   Re: Is there an opposite to '@' ?   
   30 Apr 21 10:57:32   
   
   From: admin@127.0.0.1   
      
   On Fri, 30 Apr 2021 10:30:10 +0200   
   "R.Wieser"  wrote:   
      
   > Hello all,   
   >   
   > Yesterday I got caught out by a batchfile (which I wrote myself :-) )   
   > changing the current directory - I thought I was still in the old one ...   
   >   
   > I decided that I would need to make that 'cd' (its output) visible (I've   
   > used "@echo off" at the top).   I can ofcourse do that in a number of ways,   
   > but the cleanest way would be if I could allow the 'cd' command to display   
   > its output.   
   >   
   > The question is : is there a prefix that will disable the "echo off" for   
   > that one line / command ?   
   >   
      
   Not that I know of; as you say there's ways around it; insert a bare line "CD"   
   after the "CD \mydir" is the simplest I can think of.   
   A more tedious solution is to prefix all lines but the CD one with an @.   
   (Meh!). Then you can add the @ after testing.   
      
   I tried "CD \mydir >con" but it didn't (as the CD command output is already   
   suppressed).   
      
      
      
      
   --   
   Bah, and indeed Humbug.   
      
   --- 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