I am an experienced programmer 10 years, and I am cannot see how to use Vista to search for a string in a file. Get all files that have a certain string in it. Could someone please help. Also how to find a string if it exists inside quotes inside the file.

migrated from stackoverflow.com Mar 10 '11 at 0:04

This question came from our site for professional and enthusiast programmers.


I found something that said to go to Control Panel/Folder Options, to the Search tab, and select "Always search by file name and content" to search in the file content. I don't know if that is what you are looking for. If you have Visual Studio you can also use its find in files to look for a particular string.


From the command prompt, findstr does a reasonable job of finding strings, although as with any command-line application finding quotes proves to be trickier; as I recall you need to triple them to get it to work.


Type the string in Explorer's search box. After it fails to find anything, pull down 'Search Tools' in Explorer then select 'Search Options'. In the 'What to search' box select 'Always search file names and contents (might be slow)'.

As it says, it might be slow if you have a lot of files in the folder. This option also applies to all folders now. The alternative is to Index a particular folder if you search in it a lot.

To do this, right-click it in Explorer, select Properties then click the 'Advanced...' button in the General tab. Check 'Index this folder for faster searching'. The original (faster) search option will also search contents in indexed folders.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.