|I have a file "FileList.txt" from which I am reading a list of files in which I want to search for a string.|
Let say file contains 5 file names, then I need to look in all these 5 files for a string "#void test".
If this string is not found in any of these files then delete the files name from File "FileList.txt" (which we used to find the names of the files)
The file name in FileList.txt is the 2 element after ',' so I used token 2 as I only wanted to read the 2 token.
for /f "tokens=2 delims=," %%i in (FileList.txt) do (
findstr /i "#void test" /F:somelocation\%%i
I don't know how to implement the second part, so that if "#void test" is not found, it will delete the particular file name from FileList.txt. Please help!