Searching text files |
Author: |
Message: |
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
Joined: Jul 2006
|
O.P. Searching text files
Whats the best way to search over 100 text files, for one word?
|
|
05-02-2009 03:45 PM |
|
|
blessedguy
Skinning Contest Winner
Posts: 1762 Reputation: 25
31 / /
Joined: Jan 2008
|
RE: Searching text files
quote: Originally posted by Jimbo
Whats the best way to search over 100 text files, for one word?
Can't windows search look for words inside those files?
|
|
05-02-2009 03:50 PM |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
Joined: Jul 2006
|
O.P. RE: Searching text files
I would like to search over 100 text files for a certain word, and then display that line, which has the certain word in, into a another text file?
Is that possible?
|
|
05-02-2009 04:18 PM |
|
|
Baggins
Full Member
B000ALFAZO
Posts: 387 Reputation: 13
29 / /
Joined: Oct 2006
|
RE: Searching text files
quote: Originally posted by Jimbo
I would like to search over 100 text files for a certain word, and then display that line, which has the certain word in, into a another text file?
Is that possible?
Linux + some combination of cat and grep
|
|
05-02-2009 04:55 PM |
|
|
stoshrocket
Senior Member
formerly methos
Posts: 748 Reputation: 31
34 / /
Joined: Aug 2005
|
RE: Searching text files
It'd be quite easy in PHP...
|
|
05-02-2009 07:15 PM |
|
|
blessedguy
Skinning Contest Winner
Posts: 1762 Reputation: 25
31 / /
Joined: Jan 2008
|
RE: Searching text files
quote: Originally posted by nimicitor
Open each file and press Ctrl + F?
100 times?! =P
quote: Originally posted by methos
It'd be quite easy in PHP...
How? =O
|
|
05-02-2009 07:20 PM |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
Joined: Jul 2006
|
O.P. RE: Searching text files
Yeah i know its possible in linux, just wondering if there was any way possible in windows?
|
|
05-02-2009 07:30 PM |
|
|
L. Coyote
Senior Member
Captain Obvious
Posts: 981 Reputation: 49
39 / /
Joined: Aug 2004
Status: Away
|
RE: Searching text files
Take a look at this article, and also look at all the comments (lots of related programs, including cygwin ).
Hack, hack, hack!
Finally became a Systems Analyst!
|
|
05-02-2009 08:05 PM |
|
|
Jarrod
Veteran Member
woot simpson
Posts: 1304 Reputation: 20
– / /
Joined: Sep 2006
|
RE: Searching text files
python would be eaiser, use regex in python , if you need me to write something, pm or post
|
|
05-02-2009 10:12 PM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: Searching text files
If all the text files are in the same directory, open a command prompt in that directory and run...
find "word" *.txt > ..\results.txt
(The results file is in the parent directory so it won't be included in the search =p)
You could also use a text editor with a "find in files" feature, like PSPad or Notepad++ or EditPlus.
This post was edited on 05-03-2009 at 01:06 AM by WDZ.
|
|
05-03-2009 01:01 AM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|