I have 50 files named like: CPUNAME_installer.txt
and the content of each is something like:
CPUNAME;11724;sdaasdasdasdasdasdasd
CPUNAME;1034;231asddasd
CPUNAME;1035;231asddasd
CPUNAME;10741;231asddasd
CPUNAME;10111;231asddasd
...and so on, for hundreds of lines. I want to check if there are lines with the code 11724, 1034 or 1487 and if true, pipe the entire line to another textfile with the same name in another folder.
For now I have this working solution:
for %%f in (*_installer.txt) do (
type %%f | findstr /I /C:"11724">>outfolder\%%f
type %%f | findstr /I /C:"1034">>outfolder\%%f
type %%f | findstr /I /C:"1487">>outfolder\%%f
)
...but it takes a lot of time since it's doing six commands for each file.
Is it possible to improve this by reducing the number of commands for each file (or similar)?