Solved

Scanning for text in flat files

Posted on 2007-11-14
2
204 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

867 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

17 Experts available now in Live!

Get 1:1 Help Now