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,426 of 68,980   
   Zaidy036 to Herbert Kleebauer   
   Re: Replace line in a txt file with miss   
   11 Jan 24 08:25:46   
   
   From: Zaidy036@air.isp.spam   
      
   On 1/11/2024 2:28 AM, Herbert Kleebauer wrote:   
   > 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.   
   >   
   How do you run successfully without using the full paths to the files?   
      
   My files are on F:\ so I use full path.   
      
   "Admin-CMD" means I open a CMD window in administrative mode, which was   
   required to make _NW-B.txt in previous commands, and use the command   
   leaving off the second "%" as required and F:\_NW-B.txt in place.   
      
   Could you retest placing the files in another location and using full paths?   
      
   --- 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