Home > other >  search for string recursively in windows
search for string recursively in windows

Time:03-29

Experts,

I need to search for a string recursively in different folders and sub-folders and save it to a txt file in windows environment. I executed the below script but the result is empty.

findstr /s /i /m /c:"topaz3258" H:\MKS\build\host\dev\*\*.* > H:\topaz3258.txt

As the script is checking under multiple folders and sub-folders, I would also like to have the path of the available string stored in a txt file.

Also please advise where am i making the mistake.

CodePudding user response:

H:\MKS\build\host\dev\*.*

You cannot use wildcards to specify a subdirectory.

  • Related