• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.
 

Recommended Providers


Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

WordPress Hosting Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

How to find if a file contains a given string using dos command line

Started by Chris, October 30, 2019, 05:30:47 PM


WordPress Hosting


Chris

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?

Kailash

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!