Solved

Scanning for text in flat files

Posted on 2007-11-14
2
196 Views
Last Modified: 2010-04-23
I need to scan all the files in C:\MyFiles, look in each file for the text "XX4567" and then create a log file that displays which files included the text. These are for the most part small text/ASCII files. Thanks!
0
Comment
Question by:MuddyMojo
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 20281548
With 'grep.exe' from http://unxutils.sourceforge.net/ you can just use

grep XX4567 c:\MyFiles\*.txt > filelist.txt

where 'filelist.txt' will then contain a list of all files that contain the search string.
0
 

Author Comment

by:MuddyMojo
ID: 20281773
For Windows I actually used: http://pages.interlog.com/~tcharron/grep.html

Worked great with no actual Windows install - Just copy file in! Would never have found it without you suggesting using grep in the first place so THANK YOU!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now