Find occurrences of a string in files and display “filename - count” through batch file
问题 Batch file to search every single subfolder and every single file inside a directory and count the number of times a particular string is present in each file. Would be useful if output is "filename - count". Can do find /c "Microsoft" *.txt This works if all the files are in one folder. How do you make the find loop through all the subfolders and each of its files and display the same result. Findstr has /s which does that, doesnt work on find. 回答1: From command line: for /F "delims=" %G in