Divi WordPress Theme

Topic: How to find if a file contains a given string using dos command line  (Read 175 times)

Offline Chris

  • Junior Guru
  • **
  • Posts: 77
  • iTrader: +0/-0
    • View Profile
I want to search all files in a specific folder and its subfolders having particular word (like we can use grep command in Linux) on my Windows server. How can I use Windows command prompt to search it?
VPS Hosting - AccuWebHosting

Online Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 648
  • iTrader: +153/-0
    • View Profile
Re: How to find if a file contains a given string using dos command line
« Reply #1 on: October 30, 2019, 05:31:39 PM »
You can use findstr command to search specific string via command prompt:

To search only one word:

findstr /s “hello” *.*

If there is a space in the search word, you have to use /C option as follow:

findstr /s /C:”hello world” *.*

Hope this will be helpful!
Shopify Divi WordPress Theme
Tags: