Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 174439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:31:21+00:00 2026-05-11T13:31:21+00:00

I need to do a recursive grep in Windows, something like this in Unix/Linux:

  • 0

I need to do a recursive grep in Windows, something like this in Unix/Linux:

grep -i 'string' `find . -print` 

or the more-preferred method:

find . -print | xargs grep -i 'string' 

I’m stuck with just cmd.exe, so I only have Windows built-in commands. I can’t install Cygwin, or any 3rd party tools like UnxUtils on this server unfortunately. I’m not even sure I can install PowerShell. Any suggestions using only cmd.exe built-ins (Windows 2003 Server)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:31:21+00:00Added an answer on May 11, 2026 at 1:31 pm

    findstr can do recursive searches (/S) and supports some variant of regex syntax (/R).

    C:\>findstr /? Searches for strings in files.  FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]         [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]         strings [[drive:][path]filename[ ...]]    /B         Matches pattern if at the beginning of a line.   /E         Matches pattern if at the end of a line.   /L         Uses search strings literally.   /R         Uses search strings as regular expressions.   /S         Searches for matching files in the current directory and all              subdirectories.   /I         Specifies that the search is not to be case-sensitive.   /X         Prints lines that match exactly.   /V         Prints only lines that do not contain a match.   /N         Prints the line number before each line that matches.   /M         Prints only the filename if a file contains a match.   /O         Prints character offset before each matching line.   /P         Skip files with non-printable characters.   /OFF[LINE] Do not skip files with offline attribute set.   /A:attr    Specifies color attribute with two hex digits. See 'color /?'   /F:file    Reads file list from the specified file(/ stands for console).   /C:string  Uses specified string as a literal search string.   /G:file    Gets search strings from the specified file(/ stands for console).   /D:dir     Search a semicolon delimited list of directories   strings    Text to be searched for.   [drive:][path]filename              Specifies a file or files to search.  Use spaces to separate multiple search strings unless the argument is prefixed with /C.  For example, 'FINDSTR 'hello there' x.y' searches for 'hello' or 'there' in file x.y.  'FINDSTR /C:'hello there' x.y' searches for 'hello there' in file x.y.  Regular expression quick reference:   .        Wildcard: any character   *        Repeat: zero or more occurrences of previous character or class   ^        Line position: beginning of line   $        Line position: end of line   [class]  Character class: any one character in set   [^class] Inverse class: any one character not in set   [x-y]    Range: any characters within the specified range   \x       Escape: literal use of metacharacter x   \<xyz    Word position: beginning of word   xyz\>    Word position: end of word  For full information on FINDSTR regular expressions refer to the online Command Reference. 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 145k
  • Answers 145k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer nm - one can just check for a null value.… May 12, 2026 at 8:50 am
  • Editorial Team
    Editorial Team added an answer You can use the HttpContext to retrieve the HttpFileCollection which… May 12, 2026 at 8:50 am
  • Editorial Team
    Editorial Team added an answer You can store as much as you want until you… May 12, 2026 at 8:50 am

Related Questions

We have a list of (let's say 50) reports that get dumped into various
It needs to be graphical. No sed, awk, grep, perl, whatever. I know how
I'm implementing a trie for predictive text entry in VB.NET - basically autocompletion as
I need to capture the KeyUp event in my form (to toggle a full

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.