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
Solved

Windows find command (from command prompt)

Posted on 2014-11-13
5
161 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
  • 3
5 Comments
 
LVL 28

Accepted Solution

by:
Bill Bach earned 125 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 125 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 250 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 250 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

by Nathan Brom/Bromy2004 Introduction There are numerous websites out there for any different type of program you can imagine.  Of those, you'll need to decide which ones are legitimate and aren't trying to steal your money or infect your comput…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
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…

839 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