windows - how to apply findstr expressions to the first column of a string in a .csv file while returning the entire string in CMD? -


i made btach script , works well, exception of returning additional strings not exact matches source file.

when run script below, return additional strings share same number structure the numbers in .txt file, additional numbers @ end of them ex.

searching "^%%l" = "^12210" return strings 12210 , 122100,122101,122102 ect..

any appreciated!

batch script:

for /d %%a in (*) (     /f %%f in ("%%a"\*.txt) (         /f %%l in (%%f) (             findstr "^%%l" c:path\file.csv  >> %%a.csv         )      )     move %%a.csv "%%a" >nul ) 

@compo- assist!! comments got me going in right direction , problem solved. ended having modify expression bit return entire string. here worked.

findstr "^%%l,*,*\>" c:\path\file.csv.  

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -