?
Solved

Windows find command (from command prompt)

Posted on 2014-11-13
5
Medium Priority
?
164 Views
Last Modified: 2014-11-14
From a command prompt I can perform the following command

find "string" *.*

How do I perform a 'find' command on subdirectories, searching all subdirectories from the current directory for the string

Thanks
0
Comment
Question by:Anthony Lucia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 28

Accepted Solution

by:
Bill Bach earned 500 total points
ID: 40440741
The command (originally from Unix/Linux) which can do this is commonly called "grep".  There are several versions of the GREP utility for Windows that you can download (many for free) that can search inside of files.  I would recommend trying out a few downloads and see which one you like.
0
 
LVL 6

Assisted Solution

by:Rob G
Rob G earned 500 total points
ID: 40440771
i don't know if this helps or not..
But to search for a specific string value in a command you can use the find /i or find in command..
For instance..

If you do a netstat -aon
and press enter you will get a ton of info, but what if you just want to know what is running on port 80.

you use netstat -aon | find /i "80" and you will get an output of anything with port 80.

This command " | find /i "80" " seems to work with everything, systeminfo, etc.. i am not sure if it will work with what you are trying to do, but it can't hurt to try...
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 1000 total points
ID: 40440800
If you just want to do a dir listing and find a string ...
dir | findstr /s /I "string."

Open in new window


/I says case insensitive

the "." represents a wildcard
0
 
LVL 29

Expert Comment

by:becraig
ID: 40440817
This can also be done using powershell
gci -path c:\folder -recurse |? {$_.psIsContainer -and $_.name -like "*string*"} 

Open in new window

0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 1000 total points
ID: 40440824
Seems I forgot the /s in the dir command
dir /s | findstr /s /I "string."

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hallo! I guess almost every Windows Administrator must have got stumped with this question "Where does WINDOWS store a users cached credentials? Every user who had once logged onto a Server/Desktop while it was connected to the domain could sti…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question