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,537 of 68,980   
   Zaidy036 to dcwhatthe@gmail.com   
   Re: findstr with backslashes representin   
   17 May 20 20:49:41   
   
   From: Zaidy036@air.isp.spam   
      
    wrote:   
   > On Monday, May 4, 2020 at 3:47:23 PM UTC-4, Herbert Kleebauer wrote:   
   >> On 04.05.2020 17:58, dc wrote:   
   >>> Hi,   
   >>>   
   >>> I'm having problems getting findstr to understand the output folder name.   
   >>>   
   >>> When running findstr, it's interpreting the WORKINGFOLDER as   
   >>>   
   >>> 1>"WorkingFolder"\   
   >>>   
   >>>   
   >>> Rem ***********************************rem Set the base name of the CSV   
   and PDF files.   
   >>> SET BASENAME=THISBASENAME   
   >>>   
   >>> SET MAINFOLDER=v:\ROOT\SECOND\THIRD\MAIN FOLDER   
   >>>   
   >>> SET WORKFOLDER=v:\ROOT\SECOND\THIRD\MAIN FOLDER\WORKING FOLDER   
   >>>   
   >>> @echo on   
   >>> Rem Remove blanks from .CSV file, and   
   >>> Rem  rename from .TXT to .CSV   
   >>> findstr  .  "%MAINFOLDER%"\\%BASENAME%.TXT > "%WORKFOLDER%"\\%BASENAME%.CSV   
   >>>   
   >>> pause   
   >>>   
   >>> Rem ***********************************   
   >>>   
   >>> So, it interprets the above findstr line as something like   
   >>>   
   >>>   
   >>> findstr  .  "v:\ROOT\SECOND\THIRD\MAIN FOLDER"\\THISBASENAME.TXT   
   >>> 1>"WorkingFolder"\\THISBASENAME.CSV   
   >>   
   >> If I run your code I get:   
   >>   
   >> findstr  .  "v:\ROOT\SECOND\THIRD\MAIN FOLDER"\\THISBASENAME.TXT   
   >> 1>"v:\ROOT\SECOND\THIRD\MAIN FOLDER\WORKING FOLDER"\\THISBASENAME.CSV   
   >   
   > Ok, thanks H.K.  I'm writing it a little differently now, to bypass this   
   anomaly.   
   >   
   >   
      
   You have gone by this already but you were missing "..." around SET since   
   space between Working Folder   
      
   --   
   Zaidy036   
      
   --- 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