Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Scanning for text in flat files

Posted on 2007-11-14
2
Medium Priority
?
244 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …
Introduction to Processes

926 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