Solved

Windows find command (from command prompt)

Posted on 2014-11-13
5
163 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…

688 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