Discussion Locked

Search and Index multiple .txt files

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a large number of .txt files in a directory and I need to be able to search across all of them from a single point. i.e., I need to open a single program, point it to the text files, type in my search criteria and get back results from any of the text files that match.

Using Win98...please limit suggestions to that OS.

TIA

Jeff

6 replies

by tmaclennan

I suspect you may want more than this, but, the Advanced tab in the Start/Find Files will allow you to search for specific text inside of files. It will return to you all of the files containing the text, though it won't show what is inside them without opening each file individually.

by tmaclennan

Another way to do this would be to use the "find" command, which returns the context of the found string as well as the filename.

by rraheb

I guess that the "Find" command from the MS-DOS prompt can do this for you.

Here is how it works:

It searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.

It is close the "grep" command which is under unix.

Hope this helps you out,

Rafik El-Raheb.

by jeffl

Yes, I know DOS as well as the Windows FIND can do this...Again, I was looking for a software program to do this (a stand-alone).

This discussion is closed to new replies.