Solved

Windows find command (from command prompt)

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
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…
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…
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…

803 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