Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

Search for word within files in a folder.

Hi Experts,
What is the easiest way to search for a word within the contents of files in a specific folder, including sub folders?
Would prefer not to install software or change pc settings, as this is needed for a one time only.
Thanks
Avatar of NVIT
NVIT
Flag of United States of America image

Using Windows Explorer search at upper right corner.

content:"text to find" *.xls

Open in new window

Avatar of bfuchs

ASKER

hi,
where should I use it, in cmd prompt? what exactly is the syntax?
just to clarify,  I'm not searching for file names, just for wording inside the files.
Thanks,
Ben
Windows Explorer
Avatar of bfuchs

ASKER

I entered the following, nothing showed up.
"0AB94000".php
also tried
content:"0AB94000" *.php
Same thing.
Thanks,
Ben
See below (in addition to the above good posts).   Try just 0AB94000.php

User generated image
Avatar of bfuchs

ASKER

@John,
See below.
User generated imageThanks,
Ben
turn on indexing?
You need to navigate to the folder and then search from there. I think that might be your issue
Lose the .php.
Avatar of bfuchs

ASKER

@John,
I'm searching from there, see image "search in staff" where staff is my folder.
@ZeropointNRG,
Any side effects from this?
How do I do it?
Thanks,
Ben
Literally just click "Computer" and type in "0AB94000" in the search box and wait for it to search will take a while.
I'm searching from there, see image "search in staff" where staff is my folder.

Thanks. It did not look like that in your screen shot
It also looks like Windows 7, so as suggested make sure indexing is ON.
Avatar of bfuchs

ASKER

Literally just click "Computer" and type in "0AB94000" in the search box
This will search in all folders, any way to specify?

so as suggested make sure indexing is ON.
How?

Thanks,
Ben
You can even just search all .php files and then in the list hover over any files and press the number 0.
Control Panel, Indexing Options.  Check there
Avatar of bfuchs

ASKER

You can even just search all .php
Actually I would prefer searching all file types, not only .php.
Thanks,
Ben
Do you actually know where that file is? Turn on indexing in the control panel. Indexing options should be there.
Follow the top part if this article to make sure search (indexing is enabled)

https://www.thewindowsclub.com/fix-search-box-is-missing-in-windows-7-start-menu-explorer

If enabled you should be able to search for phrase.*
Do you want to elaborate on exactly what you're trying to do?
Avatar of bfuchs

ASKER

User generated imageDon't see an option on/off.
Thanks,
Ben
It's already on..
Navigate to c:\programdata\microsoft so that the right side of explorer shows you the contents of that folder. Then search from the top right as we suggested.

I just tried what I suggested above on my own machine and it works fine. So the method appears to be correct
Avatar of bfuchs

ASKER

c:\programdata
I have no such folder.

Thanks,
Ben
Avatar of bfuchs

ASKER

It's already on..
So why aren't any of those suggestions working?!

Thanks,
Ben
If that is true then your "current location" in indexing options is incorrect and that will cause you problems.
If this file isn't local or it's locked or hidden or w/e and nobody can give you what you want. I know you said you don't want software, but since it's a one time thing, you can use this 30 day trial to search for it then just uninstall it. NFS Pro If you can't find it, it probably doesn't exist or you've got the file name wrong.
Avatar of bfuchs

ASKER

If that is true then your "current location" in indexing options is incorrect and that will cause you problems.
Perhaps this is the case here...how can I check that out, and what is the way to fix it?

Thanks,
Ben
Avatar of bfuchs

ASKER

If this file isn't local or it's locked or hidden
or you've got the file name wrong.
Its none of these.
I am testing with something that I know is there...

Thanks,
Ben
The folder selected should be there. Turn on Hidden Files in Windows Explorer options. Restart Explorer and check. That is my index location and the folder is there.  Check as per just above
Avatar of bfuchs

ASKER

The folder selected should be there. Turn on Hidden Files in Windows Explorer options.
Ok now its there, so how do I go further?
when searching for the word there it does not find.
asking me if want add this location to index, just say yes?

Thanks,
Ben
OK,  gone for the night.

Check your Explorer options for Hidden Files/Folders   and turn that on.  Then search should be working fine.
Ok now its there, so I do I go further?  when searching for the word there it does not find.  asking me if want add this location to index, just say yes?

Yes.    I will check in tomorrow
Avatar of bfuchs

ASKER

asking me if want add this location to index, just say yes?

Yes
Ok done that.
Now when going to the folder and entering 0AB94000 only some type of files come up, any idea why?

Thanks,
Ben
OMG ... a lot of suggestion for a thing that never worked well ..
the windows search it's the worst part of windows, totally crapware ....
after windows 98 i always disable the windows search and the indexing (that consume a lot of resource cpu+disk space) and always used "Agent Ransack". It can replace the F3 search on windows (hook on shell), it's fast, has regular expression, preview of the search, don't use preindex but it's really really fast !
give it a try .. it's free
https://www.mythicsoft.com/agentransack/download/

have a good day
Windows Search works great here. No need for Agent Ransack
At this point, since most of the settings seem to be working, try rebuilding the index.

Go to Control Panel, Indexing Options, Advanced and click on Rebuild Index.

Now indexing will rebuild and it could take several hours.
Separately, Windows 7 is nearly dead and you need to move on to Windows 10.  Search in Windows 10 works very well.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfuchs

ASKER

@Bill,
Yours worked!!

@John,
Will test now Rebuild Index.

Now indexing will rebuild and it could take several hours.
During this time can I continue working on my pc, w/o any complications?

Thanks,
Ben
During this time can I continue working on my pc, w/o any complications?

Yes.   PC work may slow down re-indexing a bit but not seriously
Oh you wanted to find text inside a file, not an actual file!  lol..Sorry about that ;)
Avatar of bfuchs

ASKER

Hi Experts,

After following all suggested (including rebuilding index) only Bill's suggestion seems to work at my pc...

Thanks for All!
Avatar of Bill Prew
Bill Prew

Glad that helped.


»bp