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 68,425 of 68,980   
   Herbert Kleebauer to All   
   Re: Replace line in a txt file with miss   
   11 Jan 24 08:28:35   
   
   From: klee@unibwm.de   
      
   On 11.01.2024 03:09, Zaidy036 wrote:   
      
   > Did you test your suggestions in Admin-CMD?   
      
   I executed the following batch file:   
      
   ::@echo off   
      
   FOR /F "USEBACKQ TOKENS=1,2 DELIMS=:" %%A IN ("_NW-B.txt") DO (   
   IF "%%B"=="" ECHO %%A >> _NW-N.txt)   
      
      
   With the input file _NW-B.txt:   
      
   SSID 1 : Residents 5   
   SSID 2 : HSL2   
   SSID 3 : AscomI62   
   SSID 4 : Guest   
   SSID 5 : ResidentsA   
   SSID 6 : ResidentsB   
   SSID 7 :   
   SSID 8 : XFINITY   
   SSID 9 : A440   
      
      
   and got the output file _NW-N.txt:   
      
   SSID 7   
      
      
      
   > Why does it work in Admin-CMD BUT not in a batch?   
      
   What do you mean with "Admin-CMD"? But in a batch   
   the above code works here.   
      
   --- 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