Author Options:

Is it possible to search something in a WORD doc using a DOS command, let's say finding a word? Answered


Well, press CTRL+F in Word 'ought to do the trick, but yes, there is a way.

@echo off
set /p path=Set the file file path to the document:
cd %path%
set /p name=Type the name of the document (remember the extension):
set /p find=Type what you are trying to find:
findstr "%find%" "%name%"

That should hopefully do the trick, although I'm not very well acquainted with the findstr or find commands.

Good luck, and I hope this helps.

Use Word for that function.
I'm sure there are DOS programs that will search files, but there's FIND if you want to stick with what you've got without downloading anything.


Not with DOS that I know of. There's a Perl module that can do it really easily though.

With DOS Command i assume not possible, until you can write a batch program to convert your doc files into rtf or txt and then search there in what you need.
you can do it however with windows explorer.